fangyidong / json-simple

A simple Java toolkit for JSON. You can use json-simple to encode or decode JSON text.
Apache License 2.0
746 stars 340 forks source link

defaulting keys to String and using an efficient HashMap for small data could increase the performance. #152

Open sandeepjakkaraju opened 1 year ago

sandeepjakkaraju commented 1 year ago

Dear Sir,

Since most of the JSON keys are string for readability and best practise. It would be efficient to use Strings as keys by default like other JSON libraries. I found that it not only increases Parsing performance (PUT) but also GET operations.

Please consider defaulting keys to String and using an efficient HashMap for small data could increase the performance.

Thanks Sandeep

Screenshot 2023-05-22 at 5 24 01 PM

sandeepjakkaraju commented 1 year ago

Screenshot 2023-05-23 at 1 31 15 PM

sandeepk-nd commented 1 year ago

https://github.com/fangyidong/json-simple/pull/153