TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Jsonpak: JSON that is not bloated for Nim

2 pointsby planetisabout 1 year ago
My library uses packed ASTs for compact and efficient JSON representation, with JSON Pointer, JSON Patch support. It also offers a recursive sort function, that allows to provide repeatable hashes and canonical JSON. Performance can be further enhanced by replacing for loops with memmove operations. The next steps would be to write a schema validator and a fuzzer.

1 comment

planetisabout 1 year ago
I will add that as a library, it has a big potential to be used in resource restricted envs, such as microcontrollers. Every other JSON library under the sun uses HashMaps or Btrees to structure the tree which end up wasting space. Another interesting one called Araq/packedjson whose ideas I borrowed, might be the most space efficient design so far, however it looses on speed comparisons on operations that involve removing items. That's because some structure should be maintained and this library provides the best trade-off between complexity and space efficiency.