× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Your formatting disappeared completely.

"Or is that the value with no name?" - Yes - except that the name is api_product_list.

I _think_ you are making the same mistake I made when starting with json in that you are expecting everything to be name/value pairs. That is not the case.

This is the way I think of it (probably an oversimplification but it works for me.

1: A json _object_ consists of name/value pairs.

2: The value portion can be a string, a number, an object, an array, a boolean, or null.

3: If the value is an array the array can include objects (which of course will be in name/value form) but arrays can contain anything and a simple list of values is just fine.
See https://www.w3schools.com/js/js_json_arrays.asp <https://www.w3schools.com/js/js_json_arrays.asp> for several examples.

Looking at your json again it seems to me that api_product_list is probably not an array. Look at where the [ array marker is placed. It is within the value (i.e. within the " quotes). It is I suspect a simple csv list as a single text sting. Goodness knows why they bothered with the [ ] pair - it just confuses things.

api_product_list_json on the other hand is a json array - the array marker being _outside_ the quotes.

Probably if there were multiple values it would look something like this:
"api_product_list" : "[ P2P Rideshare API Product, Public Transport API Product]",
"api_product_list_json" : [ "P2P Rideshare API Product", "Public Transport API Product"]

The folks that gave you the sample json could have made your life much easier with a better example!

Hope this helps.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jan 11, 2019, at 6:29 PM, Don Brown <DBrown@xxxxxxxxxx> wrote:

Thanks to all who replied.

Greg: Thanks for the tip, I have installed the json plugin for Firefox. I
feel this is going to get good use.

Greg: I also opened the json string in Firefox. I am not sure how to
interpret the results. (At least the results are consistent between
Notepad++ and Firefox)

Jon: Thank you for your response, your solution works but I must admit to
being confused as per my comment (To me this is saying it is an array
because of the [ brackets but there is only one name in the array with no
value ? Or is that the value with no name ?) Let me provide more detail... <snip>.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.