Save data not valid JSON data

Discussion and help for Easy Save 3
Post Reply
User avatar
Joel
Moodkie Staff
Posts: 4812
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save data not valid JSON data

Post by Joel »

Hi there,

When storing Dictionaries we break the validity of JSON to improve performance and readability. To remain valid with JSON, Dictionaries would need to be represented as an array of objects with separate key/value fields, which would increase the overhead quite significantly, and is quite difficult to read.

With regards to duplicate keys, there is nothing in the standard which says that this isn't allowed (see https://stackoverflow.com/questions/218 ... -an-object). This will only be imposed by the serialiser/deserialiser you are using, and Easy Save does not impose this restriction.

Easy Save's JSON data isn't intended to be parsed by anything other than Easy Save. If you want to upload the data to a database, you should upload and store the JSON as a string, rather than trying to parse it.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply