0
{ members: [
    [
        {
            c1: [{fft: 5,v: '[email protected]'}],
            c2: [{fft: 9,v: 'tst'}],
            c3: [{sft: 1,v: 'Corporate Member'}]},
        {
            c1: [{fft: 5,v: '[email protected]'}],
            c2: [{fft: 9,v: 'asd'}],
            c3: [{sft: 1,v: 'Company'}]}

        ...etc

What is this JSON format? The full version is here.

It just doesn't look like any other JSON I've seen. I would be very thankful for a pointer in the right direction to parse this. So long as it's not just regex it, which I'm sure is possible but not something I can accomplish.

1
  • What exactly are you asking? A couple points: this is not valid JSON syntactically. Also, there's only one JSON format. Structurally, all JSON looks the same, so I'm not sure how you haven't seen nested objects and arrays. Are you asking what this is representing semantically or syntactically? If you're asking semantics, the API publisher is a better source of information. Mar 5, 2010 at 19:53

4 Answers 4

5

This appears to be the result of an ASP .NET web service based on the .asmx in the URL. What looks non-standard to me (based on the http://www.json.org/ definition) is the lack of double-quotes around the keys, and single-quotes instead of double-quotes wrapping the string values. E.g. v: '[email protected]' should be "v": "[email protected]". I believe this is object literal notation of JavaScript (http://www.dyn-web.com/tutorials/obj_lit.php) rather than strict JSON, which is itself a subset of object literal notation.

How you choose to parse it could depend on what language/platform constraints you have, but I believe JavaScript will handle it. For an example, see this JSON/JavaScript code on Google Code Playground: http://code.google.com/apis/ajax/playground/#json_data_table. It constructs a JSON object using object literal notation for its visualization service.

1

Judging by this question and its followup on the Wild Apricot forums, you're poking at an undocumented tool primarily intended for internal use. Your best bet is to leave it alone. Your second-best bet is to hack at an existing parser in whatever language you are handling this with so that the parser tolerates unquoted keys.

0

You would probably be best off using a standard JSON library to parse it. A full list, organized by platform, is available at the json.org site.

0
0

That's not JSON. It actually looks like a lua source code encoding of the data. But if it is undocumented, it could be anything, so you're probably not going to be able to handle it reliably.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.