LitJSON / litjson

JSON library for the .Net framework
https://litjson.net/
Other
1.36k stars 403 forks source link

IOrderedDictionary.Insert adds key multiple times #145

Open EllieTellie opened 1 year ago

EllieTellie commented 1 year ago

Hi,

I have noticed this method adds the key multiple times. I needed some json to be added to the start of the json document and not at the end.

My fix was simply to add at the start of the function EnsureDictionary (); And replace this[property] = data; with inst_object[property] = data;

Then it works properly. Do you want me to make a pull request? I have a homebrew fork so it's not exactly compatible, but I can make a proper fork and just do this one change.

Regards, Rene