SJSON is a complement to GJSON, also written in Go, focused on setting or modifying values inside JSON documents through path expressions. Just as GJSON allows fast retrieval, SJSON allows fast mutation: you provide a JSON document, a dot-notation path (including array indices or the special “-1” index for appending), and a new value, and SJSON produces the updated JSON. It supports many data types (numbers, strings, bools, arrays, maps), raw byte paths, and options for in-place replacement. Because it avoids full unmarshalling into structs, it is very efficient for many use-cases where you just need to tweak a JSON document quickly. Paths support appending to arrays, creating intermediate structures if missing, and deleting (via the Delete function). It’s ideal for manipulating JSON dynamically in Go without bulky models.

Features

  • Set a value in JSON given a path (dot notation)
  • Append to arrays via special -1 index usage
  • Delete values via path expression
  • Works with raw bytes or string representations of JSON
  • Support for SetRaw to inject raw JSON blocks
  • Options for in-place replacement to reduce allocations

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

MIT License

Follow SJSON

SJSON Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SJSON!

Additional Project Details

Programming Language

Go

Related Categories

Go JSON Software

Registered

3 days ago