Skip to content

Tags: zarmack/gjson

Tags

v1.6.0

Toggle v1.6.0's commit message
Remove custom appengine and js builds

This commit allows for gjson and sjson to be supported in
WebAssembly `wasm` projects, but breaks compatibility for
anyone using gjson with older Google App Engine and GopherJS.

v1.5.0

Toggle v1.5.0's commit message
Added new modifiers

`@flatten` Flattens an array with child arrays.
  [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,[6,7]]
The {"deep":true} arg can be provide for deep flattening.
  [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,6,7]
The original json is returned when the json is not an array.

`@join` Joins multiple objects into a single object.
  [{"first":"Tom"},{"last":"Smith"}] -> {"first","Tom","last":"Smith"}
The arg can be "true" to specify that duplicate keys should be preserved.
  [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":37,"age":41}
Without preserved keys:
  [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":41}
The original json is returned when the json is not an object.

`@valid` Ensures that the json is valid before moving on. An
empty string is returned when the json is not valid, otherwise
it returns the original json.

v1.4.0

Toggle v1.4.0's commit message
Removed unmarshalling

v1.3.6

Toggle v1.3.6's commit message
Removed unneeded comment

v1.3.5

Toggle v1.3.5's commit message
Fixed modifier pipe issue

This commit fixes an issue where chaining modifiers that used a
string arg would fail to process the modifier following the first.

fixes tidwall#143

v1.3.4

Toggle v1.3.4's commit message
Fix trailing multiselector value

v1.3.3

Toggle v1.3.3's commit message
Add link to multipaths

v1.3.2

Toggle v1.3.2's commit message
Fix panic when key starts at-sign

v1.3.1

Toggle v1.3.1's commit message
Support subqueries

It's now possible to do a query like

  topology.instances.#(service_roles.#(=="one"))#.service_version

On a JSON document such as

  {
    "topology": {
      "instances": [{
        "service_version": "1.2.3",
        "service_roles": ["one", "two"]
      },{
        "service_version": "1.2.4",
        "service_roles": ["three", "four"]
      },{
        "service_version": "1.2.2",
        "service_roles": ["one"]
      }]
    }
  }

Resulting in

  ["1.2.3","1.2.2"]

v1.3.0

Toggle v1.3.0's commit message
Fix missing raw result for array counts