Re: JSON and euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message
robsteele said...

so i was thinking, i haven't seen a JSON encode/decode lib for eu. I'm thinking into it and am having a problem with the design. A JSON object can be an associative arr, and currently there is no standard for the representation of that. ie JSON {"foo" : "bar"} problem is that's easy to rep as a sequence ie 'foo','bar' but what happens when you have a JSON object with an array also { 'foo' :'bar', 'users' : ['user1', 'user2'] } {{'foo', 'bar'}, {'users', {'user1', 'user2'} } } the array will be treated as an associative one. so the question is, how to rep json code succinctly in a sequence so as to recreate the original.

I think the answer is to represent the JSON using a library that provides associative arrays. Let the associative array library deal with how to represent the associative array as a sequence, then your code just deals with representing a JSON object as an associative array.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu