JSON Data Source


(Robin Shi) #1

Hi,

Has anyone successfully used JSON Data Source in 4.10.4?

I have followed http://manuals.matrix.squizsuite.net/data/chapters/json-data-source, the returned JSON data was parsed well, but no shadow assets were created.

Thanks.

Robin


(Bart Banda) #2

I haven't used it before, but I assume that Matrix would give you some errors if the JSON was incorrect or as to why no shadow assets are created?

Nothing in the Matrix logs after you hit the commit button on the JSON data source asset?

Also, what do you see when you look at the View JSON Data screen?


(Robin Shi) #3

Hi Bart,

The returned JSON is parsed successfully, same structure as the example in the manual. I didn't find any error log against loading JSON data source asset.

Now I use REST Resource JavaScript asset, which seems a much better solution than JSON data source + asset listing.

The person who added REST Resource JavaScript into Matrix should be awarded!


(Bart Banda) #4

Yea the REST JS asset is awesome, it can be used for sooo many great things. Glad it works for you. Strange that the Data source asset didn't do the trick though :S


(Warwick Barnes) #5

Don't know if this is relevant to you, but we had trouble with JSON data sources due to special characters in the data (and no clear message from the system about where the error was).

 

Using a JSON checking service (such as http://jsonlint.com) was helpful. I didn't realise we were even supposed to escape the forward slash in strings. (See http://json.org) After all of that, it worked fine.