Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tidwall/gjson
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.0
Choose a base ref
...
head repository: tidwall/gjson
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.0
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Feb 10, 2020

  1. 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.
    tidwall committed Feb 10, 2020
    Configuration menu
    Copy the full SHA
    0360deb View commit details
    Browse the repository at this point in the history
Loading