Skip to content

packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation.

License

Notifications You must be signed in to change notification settings

Araq/packedjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packedjson

packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation.

The API is mostly compatible with the stdlib's json.nim module, some features have been cut though.

To compile the benchmark, run these commands:

nim c -r bench\generator

nim c -r -d:release bench\benchmark.nim
nim c -r -d:release -d:useStdlib benchmark.nim

On my machine, I got these results:

packed json:  used Mem: 94.06MiB time: 2.622s
stdlib json:  used Mem: 1.277GiB time: 3.759s

packedjson is now being used in production and seems to be reasonably stable.

About

packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages