https://github.com/jmank88/jsonseq
Go package for reading and writing JSON text sequences (application/json-seq) as defined in RFC 7464
https://github.com/jmank88/jsonseq
go golang json rfc-7464
Last synced: about 1 year ago
JSON representation
Go package for reading and writing JSON text sequences (application/json-seq) as defined in RFC 7464
- Host: GitHub
- URL: https://github.com/jmank88/jsonseq
- Owner: jmank88
- License: apache-2.0
- Created: 2017-01-21T01:23:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T12:36:23.000Z (over 4 years ago)
- Last Synced: 2025-03-19T03:54:17.142Z (over 1 year ago)
- Topics: go, golang, json, rfc-7464
- Language: Go
- Homepage:
- Size: 77.1 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonseq [](https://godoc.org/github.com/jmank88/jsonseq) [](https://travis-ci.org/jmank88/jsonseq) [](https://goreportcard.com/report/github.com/jmank88/jsonseq)
A Go package providing methods for reading and writing JSON text sequences
(`application/json-seq`) as defined in RFC 7464 (https://tools.ietf.org/html/rfc7464).
## Usage
```go
_ = jsonseq.NewEncoder(os.Stdout).Encode("Test")
// "Test"
_ = jsonseq.WriteRecord(os.Stdout, []byte(`{"id":2}`))
// {"id":2}
var i interface{}
d := jsonseq.NewDecoder(strings.NewReader(`{"id":1} 12341234 true discarded junk`))
_ = d.Decode(&i)
fmt.Println(i)
// map[id:1]
```
See the [GoDoc](https://godoc.org/github.com/jmank88/jsonseq) for more information
and [examples](https://godoc.org/github.com/jmank88/jsonseq#pkg-examples).