romanyx / Jwalk
Licence: mit
Walk through JSON with Go
Stars: ✭ 64
Labels
Projects that are alternatives of or similar to Jwalk
Ngx Excel Export
Angular6 application with export data to excel file functionality.
Stars: ✭ 58 (-9.37%)
Mutual labels: json
I18n Generator
i18n json files generator for node, web browser and command line
Stars: ✭ 60 (-6.25%)
Mutual labels: json
Whc datamodelfactory
Mac上iOS开发辅助工具,快速把json/xml数据转换生成对应模型类属性,省去麻烦手动创建,提高开发效率。Mac iOS development aid, quickly put the json/XML data transformation generates the corresponding model class attribute, save trouble created manually, improve the development efficiency.
Stars: ✭ 1,118 (+1646.88%)
Mutual labels: json
Jsonschema Key Compression
Compress json-data based on its json-schema while still having valid json
Stars: ✭ 59 (-7.81%)
Mutual labels: json
Govalid
Data validation library for golang. [MIGRATING TO NEW ADDRESS]
Stars: ✭ 59 (-7.81%)
Mutual labels: json
Gophergameserver
🏆 Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
Stars: ✭ 61 (-4.69%)
Mutual labels: json
Hibernate Types
The Hibernate Types library gives you extra types that are not supported by the Hibernate ORM core.
Stars: ✭ 1,122 (+1653.13%)
Mutual labels: json
Funcj
Assorted functional-oriented data structures and algorithms for Java.
Stars: ✭ 60 (-6.25%)
Mutual labels: json
Ediengine
Simple .NET EDI X12 Reader, Writer and Validator. EDI JSON Serialization and Deserialization. Written in C#
Stars: ✭ 61 (-4.69%)
Mutual labels: json
Jsonfield
A reusable Django model field for storing ad-hoc JSON data
Stars: ✭ 1,101 (+1620.31%)
Mutual labels: json
Fhir.js
Node.JS library for serializing/deserializing FHIR resources between JS/JSON and XML using various node.js XML libraries
Stars: ✭ 61 (-4.69%)
Mutual labels: json
Re Txt
converts text-formats from one to another, it is very useful if you want to re-format a json file to yaml, toml to yaml, csv to yaml, ... etc
Stars: ✭ 59 (-7.81%)
Mutual labels: json
Proposal Well Formed Stringify
Proposal to prevent JSON.stringify from returning ill-formed strings
Stars: ✭ 61 (-4.69%)
Mutual labels: json
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+12914.06%)
Mutual labels: json
File Extension List
Organised collection of common file extensions
Stars: ✭ 63 (-1.56%)
Mutual labels: json
Low Latency Android Ios Linux Windows Tvos Macos Interactive Audio Platform
🇸Superpowered Audio, Networking and Cryptographics SDKs. High performance and cross platform on Android, iOS, macOS, tvOS, Linux, Windows and modern web browsers.
Stars: ✭ 1,121 (+1651.56%)
Mutual labels: json
Cssparser.js
cssparser.js is a parser that generate json from css with matched orders & structures.
Stars: ✭ 61 (-4.69%)
Mutual labels: json
jwalk
Jwalk is built on top of easyjson/jlexer, and allows to easily unmarshal any JSON input with arbitrary key names by walking through it.
Usage
package main
import (
"fmt"
"log"
"github.com/romanyx/jwalk"
)
const input = `{
"key1": [{
"id": 1
}, {
"id": 2
}],
"key2": [1,2],
"key3": {
"id": 1,
"name": null
}
}`
func main() {
i, err := jwalk.Parse([]byte(input))
if err != nil {
log.Fatal(err)
}
switch v := i.(type) {
case jwalk.ObjectWalker:
v.Walk(func(key string, value interface{}) error {
fmt.Println(key + ":")
switch v := value.(type) {
case jwalk.ObjectsWalker:
v.Walk(func(obj jwalk.ObjectWalker) error {
fmt.Println("\t-")
obj.Walk(func(key string, value interface{}) error {
if v, ok := value.(jwalk.Value); ok {
fmt.Println("\t", key+":", v.Interface())
}
return nil
})
return nil
})
case jwalk.Value:
fmt.Println("\t", v.Interface())
case jwalk.ObjectWalker:
v.Walk(func(key string, value interface{}) error {
if v, ok := value.(jwalk.Value); ok {
fmt.Println("\t", key+":", v.Interface())
}
return nil
})
}
return nil
})
}
}
Testing
go test
Contributing
Please feel free to submit issues, fork the repository and send pull requests!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].