Optimized JSON for Go is a high performance parser with a variety of additional JSON tools

{}j

Build Status Coverage Status Go Report Card

Optimized JSON for Go is a high performance parser with a variety of additional JSON tools. OjG is optimized to processing huge data sets where data does not necessarily conform to a fixed structure.

Features

  • Fast JSON parser. Check out the cmd/benchmarks app in this repo.
  • Full JSONPath implemenation that operates on simple types as well as structs.
  • Generic types. Not the proposed golang generics but type safe JSON elements.
  • Fast JSON validator (7 times faster with io.Reader).
  • Fast JSON writer with a sort option (4 times faster).
  • JSON builder from JSON sources using a simple assembly plan.
  • Simple data builders using a push and pop approach.
  • Object encoding and decoding using an approach similar to that used with Oj for Ruby.
  • Simple Encoding Notation, a lazy way to write JSON omitting commas and quotes.

Using

A basic Parse:

    obj, err := oj.ParseString(`{
        "a":[
            {"x":1,"y":2,"z":3},
            {"x":2,"y":4,"z":6}
        ]
    }`)

Using JSONPath expressions:

1)].y") ys := x.Get(obj) // returns [4]">
    x, err := jp.ParseString("a[?(@.x > 1)].y")
    ys := x.Get(obj)
    // returns [4]

The oj command (cmd/oj) uses JSON path for filtering and extracting JSON elements. It also includes sorting, reformatting, and colorizing options.

$ oj -m "(@.name == 'Pete')" myfile.json

More complete examples are available in the go docs for most functions. The example for Unmarshalling interfaces demonstrates a feature that allows interfaces to be marshalled and unmarshalled.

Installation

go get github.com/ohler55/ojg
go get github.com/ohler55/ojg/cmd/oj

or just import in your .go files.

import (
    "github.com/ohler55/ojg/alt"
    "github.com/ohler55/ojg/asm"
    "github.com/ohler55/ojg/gen"
    "github.com/ohler55/ojg/jp"
    "github.com/ohler55/ojg/oj"
    "github.com/ohler55/ojg/sen"
)

To build and install the oj application:

go install ./...

Benchmarks

Higher numbers (longer bars) are better.

Parse string/[]byte
       json.Unmarshal           55916 ns/op    17776 B/op    334 allocs/op
         oj.Parse               39570 ns/op    18488 B/op    429 allocs/op
   oj-reuse.Parse               17881 ns/op     5691 B/op    364 allocs/op

   oj-reuse.Parse        █████████████████████▉ 3.13
         oj.Parse        █████████▉ 1.41
       json.Unmarshal    ▓▓▓▓▓▓▓ 1.00

Parse io.Reader
       json.Decode              63029 ns/op    32449 B/op    344 allocs/op
         oj.ParseReader         34289 ns/op    22583 B/op    430 allocs/op
   oj-reuse.ParseReader         25094 ns/op     9788 B/op    365 allocs/op
         oj.TokenizeLoad        13610 ns/op     6072 B/op    157 allocs/op

         oj.TokenizeLoad ████████████████████████████████▍ 4.63
   oj-reuse.ParseReader  █████████████████▌ 2.51
         oj.ParseReader  ████████████▊ 1.84
       json.Decode       ▓▓▓▓▓▓▓ 1.00

to JSON with indentation
       json.Marshal             78762 ns/op    26978 B/op    352 allocs/op
         oj.JSON                 7662 ns/op        0 B/op      0 allocs/op
        sen.Bytes                9053 ns/op        0 B/op      0 allocs/op

         oj.JSON         ███████████████████████████████████████████████████████████████████████▉ 10.28
        sen.Bytes        ████████████████████████████████████████████████████████████▉ 8.70
       json.Marshal      ▓▓▓▓▓▓▓ 1.00

See all benchmarks

Compare Go JSON parsers

Releases

See CHANGELOG.md

Links

Links of Interest

Contributing

  • Provide a Pull Request off the develop branch.
  • Report a bug
  • Suggest an idea
Owner
Comments
  • looking for example of something like json.Marshal

    looking for example of something like json.Marshal

    I'm looking for something like your alternative for: b, err := json.Marshal(data)

    But I can't find it (perhaps its there, but I just didn't see it)

    Can you point me to something like this?

  • Results do not match other implementations

    Results do not match other implementations

    The following queries provide results that do not match those of other implementations of JSONPath (compare https://cburgmer.github.io/json-path-comparison/):

    • [x] $[1:3] Input:

      [
        "first",
        "second",
        "third",
        "forth",
        "fifth"
      ]
      

      Expected output:

      ["second", "third"]
      

      Actual output:

      [
        "second",
        "third",
        "forth"
      ]
      
    • [x] $[0:5] Input:

      [
        "first",
        "second",
        "third",
        "forth",
        "fifth"
      ]
      

      Expected output:

      ["first", "second", "third", "forth", "fifth"]
      

      Actual output: NOT_FOUND

    • [x] $[1:10] Input:

      [
        "first",
        "second",
        "third"
      ]
      

      Expected output:

      ["second", "third"]
      

      Actual output: NOT_FOUND

    • [x] $[-4:-4] Input:

      [
        2,
        "a",
        4,
        5,
        100,
        "nice"
      ]
      

      Expected output:

      []
      

      Actual output:

      [
        4
      ]
      
    • [x] $[-4:-3] Input:

      [
        2,
        "a",
        4,
        5,
        100,
        "nice"
      ]
      

      Expected output:

      [4]
      

      Actual output:

      [
        4,
        5
      ]
      
    • [x] $[-4:2] Input:

      [
        2,
        "a",
        4,
        5,
        100,
        "nice"
      ]
      

      Expected output:

      []
      

      Actual output:

      [
        4
      ]
      
    • [x] $[-4:3] Input:

      [
        2,
        "a",
        4,
        5,
        100,
        "nice"
      ]
      

      Expected output:

      [4]
      

      Actual output:

      [
        4,
        5
      ]
      
    • [x] $[:2] Input:

      [
        "first",
        "second",
        "third",
        "forth",
        "fifth"
      ]
      

      Expected output:

      ["first", "second"]
      

      Actual output:

      [
        "first",
        "second",
        "third"
      ]
      
    • [x] $[-4:] Input:

      [
        "first",
        "second",
        "third"
      ]
      

      Expected output:

      ["first", "second", "third"]
      

      Actual output: NOT_FOUND

    • [x] $[0:3:1] Input:

      [
        "first",
        "second",
        "third",
        "forth",
        "fifth"
      ]
      

      Expected output:

      ["first", "second", "third"]
      

      Actual output:

      [
        "first",
        "second",
        "third",
        "forth"
      ]
      
    • [x] $[0:4:2] Input:

      [
        "first",
        "second",
        "third",
        "forth",
        "fifth"
      ]
      

      Expected output:

      ["first", "third"]
      

      Actual output:

      [
        "first",
        "third",
        "fifth"
      ]
      
    • [x] $[] Input:

      {
        "": 42,
        "''": 123,
        "\"\"": 222
      }
      

      Expected output:

      NOT_SUPPORTED
      

      Actual output:

      [
        {
          "": 42,
          "\"\"": 222,
          "''": 123
        }
      ]
      
    • [x] $..[1].key Input:

      {
        "k": [
          {
            "key": "some value"
          },
          {
            "key": 42
          }
        ],
        "kk": [
          [
            {
              "key": 100
            },
            {
              "key": 200
            },
            {
              "key": 300
            }
          ],
          [
            {
              "key": 400
            },
            {
              "key": 500
            },
            {
              "key": 600
            }
          ]
        ],
        "key": [
          0,
          1
        ]
      }
      

      Expected output (in any order as no consensus on ordering exists):

      [200, 42, 500]
      

      Actual output:

      [
        42
      ]
      
    • [x] $..key Input:

      {
        "object": {
          "key": "value",
          "array": [
            {
              "key": "something"
            },
            {
              "key": {
                "key": "russian dolls"
              }
            }
          ]
        },
        "key": "top"
      }
      

      Expected output (in any order as no consensus on ordering exists):

      ["russian dolls", "something", "top", "value", {"key": "russian dolls"}]
      

      Actual output:

      [
        "something",
        "top",
        "value",
        {
          "key": "russian dolls"
        }
      ]
      
    • [x] $.store..price Input:

      {
        "store": {
          "book": [
            {
              "category": "reference",
              "author": "Nigel Rees",
              "title": "Sayings of the Century",
              "price": 8.95
            },
            {
              "category": "fiction",
              "author": "Evelyn Waugh",
              "title": "Sword of Honour",
              "price": 12.99
            },
            {
              "category": "fiction",
              "author": "Herman Melville",
              "title": "Moby Dick",
              "isbn": "0-553-21311-3",
              "price": 8.99
            },
            {
              "category": "fiction",
              "author": "J. R. R. Tolkien",
              "title": "The Lord of the Rings",
              "isbn": "0-395-19395-8",
              "price": 22.99
            }
          ],
          "bicycle": {
            "color": "red",
            "price": 19.95
          }
        }
      }
      

      Expected output (in any order as no consensus on ordering exists):

      [12.99, 19.95, 22.99, 8.95, 8.99]
      

      Actual output:

      [
        19.95
      ]
      
    • [x] $[?(1==1)] Input:

      [
        1,
        3,
        "nice",
        true,
        null,
        false,
        {},
        [],
        -1,
        0,
        ""
      ]
      

      Error:

      unexpected character ']' at 1:40
      

    For reference, the output was generated by the program in https://github.com/cburgmer/json-path-comparison/tree/master/implementations/Golang_github.com-ohler55-ojg.

  • Parsing a filter expression using Equation

    Parsing a filter expression using Equation

    I'm trying to parse the JSONPath $[?(@.price < 10)] in code by passing it to:

    expr := jp.MustParseString("$[?(@.price < 10)]")
    

    and reading each fragment in expr. But I'm unable to parse the filter expression in the path.

    I know that filter expressions are first declared as Equation objects in code and passed into Filter objects, and the Filter objects encode these Equation objects in an internal data structure. But so far, I haven't found a way to convert the Filter objects back to Equation objects. Is there a way to do this?

  • getting panic on wrong expression

    getting panic on wrong expression

    i'm getting panic on bad jsonpath expression syntax: $[*].{}, expecting to get error not panic :)

    json example:

    [
      {
        "Name": "sds-sds",
        "BackendName": "sd",
        "ID": "i-0sdsd44c0",
        "PublicIP": "23.23.23.23",
        "PrivateIP": "12.12.2.2",
        "Status": "Running",
        "Type": "r5d.large"
      }
    ]
    
    // example of struct
    type Instance struct {
      ID          string
      BackendName string
      Name        string
      Type        string
      Status      string
      PrivateIP   string
      PublicIP    string
    }
    
    items := make([]*Instance, 0)
    
    ...
    
    expr, err := jp.ParseString("$[*].{}")
    if err != nil {
    	return err
    }
    
    out, err := oj.Marshal(items), &oj.Options{Indent: 2, KeyExact: true})
    if err != nil {
    	return err
    }
    
    panic: reflect: call of reflect.Value.CanInterface on zero Value
    
    goroutine 1 [running]:
    reflect.Value.CanInterface(...)
            /usr/local/opt/go/libexec/src/reflect/value.go:1005
    github.com/ohler55/ojg/jp.Expr.reflectGetChild(0xc0004f22c0, 0x3, 0x4, 0x2f01e60, 0xc0004e43f0, 0xc000494878, 0x2, 0x4, 0x2e6760f, 0x4)
            /Users/shareed2k/go-workspace/pkg/mod/github.com/ohler55/[email protected]/jp/get.go:1145 +0x38d
    github.com/ohler55/ojg/jp.Expr.Get(0xc0004f22c0, 0x3, 0x4, 0x3102880, 0xc0004db700, 0x4, 0x0, 0x0)
            /Users/shareed2k/go-workspace/pkg/mod/github.com/ohler55/[email protected]/jp/get.go:66 +0x66fe
    github.com/shareed2k/honey/pkg/place/printers.Print(0xc00035fca0, 0x4, 0x4)
            /Users/shareed2k/golang_projects/honey/pkg/place/printers/printer.go:61 +0x759
    github.com/shareed2k/honey/pkg/place/operations.Find(0x370d060, 0xc0000520a0, 0xc0004db440, 0x2, 0x2, 0x7ffeefbff1ed, 0x5, 0x0, 0x7ffeefbff1f5, 0x10, ...)
            /Users/shareed2k/golang_projects/honey/pkg/place/operations/find.go:75 +0x2d2
    github.com/shareed2k/honey/cmd.glob..func1(0x441e5a0, 0xc000443d60, 0x0, 0x5, 0x0, 0x0)
            /Users/shareed2k/golang_projects/honey/cmd/root.go:44 +0xad
    github.com/spf13/cobra.(*Command).execute(0x441e5a0, 0xc00004e250, 0x5, 0x5, 0x441e5a0, 0xc00004e250)
            /Users/shareed2k/go-workspace/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x47c
    github.com/spf13/cobra.(*Command).ExecuteC(0x441e5a0, 0x1046ab7, 0x43b0c80, 0xc000000180)
            /Users/shareed2k/go-workspace/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
    github.com/spf13/cobra.(*Command).Execute(...)
            /Users/shareed2k/go-workspace/pkg/mod/github.com/spf13/[email protected]/command.go:895
    github.com/shareed2k/honey/cmd.Execute()
            /Users/shareed2k/golang_projects/honey/cmd/root.go:53 +0x3b
    main.main()
            /Users/shareed2k/golang_projects/honey/main.go:10 +0x25
    
  • Align key option

    Align key option

    Add a key alignment option or make it the default for the pretty format.

        {
          "colors": [
            { "color": "black",   "hex": "#000", "rgb": [ 0,   0,   0   ] },
            { "color": "red",     "hex": "#f00", "rgb": [ 255, 0,   0   ] },
            { "color": "yellow",  "hex": "#ff0", "rgb": [ 255, 255, 0   ] },
            { "color": "green",   "hex": "#0f0", "rgb": [ 0,   255, 0   ] },
            { "color": "cyan",    "hex": "#0ff", "rgb": [ 0,   255, 255 ] },
            { "color": "blue",    "hex": "#00f", "rgb": [ 0,   0,   255 ] },
            { "color": "magenta", "hex": "#f0f", "rgb": [ 255, 0,   255 ] },
            { "color": "white",   "hex": "#fff", "rgb": [ 255, 255, 255 ] }
          ]
        }
    
  • Unmarshaling Type difference from json package

    Unmarshaling Type difference from json package

    I'm unsure if this is expected behavior, so I wanted to ask before figuring out recomposers. By default, the standard library's json.Decode function will turn JSON numbers into float64s (ref) for unmarshals to map[string]interface{}, while OjG looks like it tries parsing as an int, and falls back to a float if unsuccessful.

    jsoniter follows the same behavior of the standard library, and our code has later type checks on certain fields making any migration a bit more involved than a drop-in. See the below code snippet for details:

    func TestUnmarshal(t *testing.T) {
    	j := []byte(`{"plain":1, "full_decimal":1.0,
    			"negative":-1, "full_negative":-1.0,
    			"zero":0,  "full_zero":0.0}`)
    
    	var stdlib, ojg map[string]interface{}
    	err := json.Unmarshal(j, &stdlib)
    	err2 := oj.Unmarshal(j, &ojg)
    
    	if err != nil || err2 != nil {
    		panic("oh no")
    	}
    
    	for key := range stdlib {
    		if stdlib[key] != ojg[key] {
    			stdType := reflect.TypeOf(stdlib[key])
    			ojgType := reflect.TypeOf(ojg[key])
    			if stdType != ojgType {
    				t.Errorf("mismatch between stdlib type '%v' and ojg type '%v' on key '%v'", stdType.String(), ojgType.String(), key)
    			}
    		}
    	}
    }
    /* returns:
    mismatch between stdlib type 'float64' and ojg type 'int64' on key 'plain'
    mismatch between stdlib type 'float64' and ojg type 'int64' on key 'negative'
    mismatch between stdlib type 'float64' and ojg type 'int64' on key 'zero'
    */
    
  • Can't build on 32-bit CPU

    Can't build on 32-bit CPU

    Hello @ohler55. Awesome library, we looked at several JSON path implementations and your work is just beautiful.

    We came across a problem compiling Grafana with ojg as a dependency on 32-bit CPU due to usage of math.MaxInt64.

    Simple example which reproduces this:

    cd cmd/oj
    GOOS=linux GOARCH=arm go build
    # github.com/ohler55/ojg/jp
    ../../jp/get.go:414:8: constant 9223372036854775807 overflows int
    ../../jp/get.go:975:8: constant 9223372036854775807 overflows int
    ../../jp/node.go:263:8: constant 9223372036854775807 overflows int
    ../../jp/node.go:538:8: constant 9223372036854775807 overflows int
    ../../jp/parse.go:356:13: constant 9223372036854775807 overflows int
    ../../jp/parse.go:363:13: constant 9223372036854775807 overflows int
    ../../jp/slice.go:28:10: constant 9223372036854775807 overflows int
    

    Related: https://github.com/golang/go/issues/23086

    I think in most cases here it's safe to switch using math.MaxInt – but I am not sure at the moment whether it's safe to switch everywhere throughout a library, maybe there is a need to explicitly use int64 type (for example, for BigLimit boundary).

  • Remove nth element of an array using jsonPath

    Remove nth element of an array using jsonPath

    Hello, I try to remove the nth element of an array.

    I have this jsonPath:

    $.services[0]
    

    And my initial resource looks like:

    {
      "services": [
        {
          "name": "service 1",
        },
        {
          "name": "service 2",
        }
      ]
    }
    

    I have my initial resource as a byte[] in b, and then I do this:

    	compiledPath, _ := jp.ParseString("$.services[0]")
    
    	var resourceAsMap interface{}
    	_ = json.Unmarshal(b, &resourceAsMap)
    
    	_ = compiledPath.Del(resourceAsMap)
    

    (I removed the error handling for lisibility here)

    I expected to have this after the Delete:

    {
      "services": [
        {
          "name": "service 2",
        }
      ]
    }
    

    But instead of this I have:

    {
      "services": [
        null,
        {
          "name": "service 2",
        }
      ]
    }
    

    When debugging I see that the null comes from here: https://github.com/ohler55/ojg/blob/7e29c4a1d4424608c77ed9f2dfdf2d3623572293/jp/set.go#L204

    My question is, does the Del function should set the element to nil in the case of an array, or removing it? Thank you in advance for your answer!

  • Unicode error token reporting

    Unicode error token reporting

    When encountering errors at multi-byte/unicode tokens, the ojg parser reports an error message with the wrong character.

    $ echo '→' | oj
    *-*-* unexpected character 'â' at 1:1
    

    I'd like to either display the correct unicode character, or omit it:

    *-*-* unexpected character '→' at 1:1
    

    Note: this same bug shows up in the "encoding/json" library and in Firefox JS, but is correct in Chrome JS.

    Here is Chrome's error message:

    > JSON.parse('→')
    
    VM83:1 Uncaught SyntaxError: Unexpected token → in JSON at position 0
        at JSON.parse (<anonymous>)
        at <anonymous>:1:6
    
  • Custom Marshalers and Unmarshalers not respected

    Custom Marshalers and Unmarshalers not respected

    When invoking oj.Marshal or oj.Unmarshal, any custom JSON [Un]Marshalers are expected to be invoked. This behavior is seen in the standard library's json package. Below is a code snipped showing the issue:

    
    type Decimal struct {
    	value *big.Int
    	exp   int32
    }
    
    func (d Decimal) MarshalJSON() ([]byte, error) {
    	return []byte(fmt.Sprintf("\"%d,%d\"", d.value, d.exp)), nil
    }
    
    type TestStruct struct {
    	Outer  bool   `json:"outer"`
    	Decimal Decimal `json:"decimal"`
    }
    
    func TestMarshall_ArrCompatibility(t *testing.T) {
    
    	strct := []TestStruct{{
    		Outer:   true,
    		Decimal: Decimal{big.NewInt(5), 2},
    	}}
    
    	stdBuf, err := json.Marshal(strct)
    	tt.Nil(t, err)
    
    	ojBuf, err := oj.Marshal(strct)
    	tt.Nil(t, err)
    
    
    	tt.Equal(t, true, strings.Contains(string(stdBuf), "\"decimal\":\"5,2\""))
    	if !strings.Contains(string(ojBuf), "\"decimal\":\"5,2\"") {
    		t.Fatal("Mashaled JSON did not invoke custom Marshaler.  Expected: \"decimal\":\"5,2\" to be present.  Got: ", string(ojBuf))
    	}
    }
    

    which returns the following:

    Mashaled JSON did not invoke custom Marshaler.  Expected: "decimal":"5,2" to be present.  Got:  [{"decimal":{},"outer":true}]
    
  • `jp` maches array elements in reverse order

    `jp` maches array elements in reverse order

    When a JSONPath query uses wildcard or union indexing (.e.g $.array[*] or $.array[0,1]), array elements appear to be matched in reverse order. Here is a minimal reproducer:

    bash$ /bin/cat bug_test.go 
    package test
    
    import (
            "testing"
    
            "github.com/stretchr/testify/assert"
            "github.com/ohler55/ojg/jp"
            "github.com/ohler55/ojg/oj"
    )
    
    func TestCase(t *testing.T) {
        obj, _ := oj.ParseString(`{
            "a":[
                {"x":1,"y":2,"z":3},
                {"x":2,"y":4,"z":6}
            ]
        }
        `)
    
        x, _ := jp.ParseString("$.a[*].y")
        ys := x.Get(obj)
        assert.Equal(t, []interface{}{2, 4}, ys)
    }
    
    bash$ go test
    --- FAIL: TestCase (0.00s)
        bug_test.go:22: 
                    Error Trace:    bug_test.go:22
                    Error:          Not equal: 
                                    expected: []interface {}{2, 4}
                                    actual  : []interface {}{4, 2}
                                
                                    Diff:
                                    --- Expected
                                    +++ Actual
                                    @@ -1,4 +1,4 @@
                                     ([]interface {}) (len=2) {
                                    - (int) 2,
                                    - (int) 4
                                    + (int64) 4,
                                    + (int64) 2
                                     }
                    Test:           TestCase
    FAIL
    exit status 1
    FAIL    _/mnt/Data/work/code/jp-bug     0.002s
    
  • Sponsor this project

    Sponsor this project

    Hi! We're going to start using this project as a dependency to reviewpad. It is our policy to try to sponsor all open source projects that we use. Is there a way to do this? FYI: We typically do GitHub sponsors.

  • Aggregates

    Aggregates

    Hey! Are you able to calculate aggregates with ojg? If so, could you please provide an example of an average of a field (using the command-line tool if possible)? Thanks!

Get JSON values quickly - JSON parser for Go
Get JSON values quickly - JSON parser for Go

get json values quickly GJSON is a Go package that provides a fast and simple way to get values from a json document. It has features such as one line

Dec 28, 2022
Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

fastjson - fast JSON parser and validator for Go Features Fast. As usual, up to 15x faster than the standard encoding/json. See benchmarks. Parses arb

Jan 5, 2023
A JSON stream parser for Go

pjson A JSON stream parser for Go Example The example below prints all string values from a JSON document. package

Oct 3, 2022
One of the fastest alternative JSON parser for Go that does not require schema

Alternative JSON parser for Go (10x times faster standard library) It does not require you to know the structure of the payload (eg. create structs),

Jan 2, 2023
A fast json parser for go

rjson rjson is a json parser that relies on Ragel-generated state machines for most parsing. rjson's api is minimal and focussed on efficient parsing.

Sep 26, 2022
Slow and unreliable JSON parser generator (in progress)

VivaceJSON Fast and reliable JSON parser generator Todo List parse fields parse types generate struct generate (keypath+key) to struct Value Mapping F

Nov 26, 2022
JSON:API compatible query string parser

QParser The package helps to parse part of the URL path and its parameters string to a handy structure. The structure format is compatible with the JS

Dec 21, 2021
Easy JSON parser for Go. No custom structs, no code generation, no reflection

Easy JSON parser for Go. No custom structs, no code generation, no reflection

Dec 28, 2022
A JSON parser/generator for Go

FASTJSON fastjson是java版本的fastjson库的api做一个翻译,方便习惯java的人操作json数据 主要适用场景:层级和字段都不能确定的json 这个库并不实现高性能json解析,依赖标准库json 这个库并没有100%实现java版的api 安装 go get -u gi

Dec 29, 2021
A tools to find the path of a specific key in deep nested JSON.
A tools to find the path of a specific key in deep nested JSON.

如何快速从深层嵌套 JSON 中找到特定的 Key #公众号 在爬虫开发的过程中,我们经常遇到一些 Ajax 加载的接口会返回 JSON 数据。

Dec 13, 2022
Simple Email Parser

mp - mail parser mp is a simple cli email parser. It currently takes stdin and outputs JSON. Example: cat fixtures/test.eml | mp { "Text": "Hello w

Sep 26, 2022
Go-json5 - A parser that supports a subset of the JSON5 specification

barney.ci/go-json5 This library implements a parser that supports a subset of th

Oct 10, 2022
JSONL graph tools - Graph is represented as JSONL of nodes and edges.

JSONL graph tools - Graph is represented as JSONL of nodes and edges.

Sep 27, 2022
JSON diff library for Go based on RFC6902 (JSON Patch)

jsondiff jsondiff is a Go package for computing the diff between two JSON documents as a series of RFC6902 (JSON Patch) operations, which is particula

Dec 4, 2022
Fast JSON encoder/decoder compatible with encoding/json for Go
Fast JSON encoder/decoder compatible with encoding/json for Go

Fast JSON encoder/decoder compatible with encoding/json for Go

Jan 6, 2023
Package json implements encoding and decoding of JSON as defined in RFC 7159

Package json implements encoding and decoding of JSON as defined in RFC 7159. The mapping between JSON and Go values is described in the documentation for the Marshal and Unmarshal functions

Jun 26, 2022
Json-go - CLI to convert JSON to go and vice versa
Json-go - CLI to convert JSON to go and vice versa

Json To Go Struct CLI Install Go version 1.17 go install github.com/samit22/js

Jul 29, 2022
JSON Spanner - A Go package that provides a fast and simple way to filter or transform a json document

JSON SPANNER JSON Spanner is a Go package that provides a fast and simple way to

Sep 14, 2022
A Small tool for SDWAN performance test and policy validation

sdwan-perf Sdwan-perf is based on golang and could support almost platform for performance and policy validation. SDWAN Performance Test Report +--

Sep 3, 2022