This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| import "github.com/olvrng/ujson" | |
| func main() { | |
| input0 := []byte(`true`) | |
| ujson.Walk(input0, func(level int, key, value []byte) bool { | |
| fmt.Printf("level=%v key=%s value=%s\n", level, key, value) | |
| return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Minimal JSON parser which works with correct input only. | |
| // Usecase: | |
| // 1. Walk through unstructured json | |
| // 2. Transform unstructured json | |
| // without fully unmarshalling it into a map[string]interface{} | |
| // | |
| // Caution: Behaviour is undefined on invalid json. Use on trusted input only. | |
| package µjson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| this=$0 | |
| prog=$(basename $0) | |
| current=$prog | |
| quickusage="Run '$prog help' for usage." | |
| quickusage() { | |
| echo "" | |
| echo "$current: unknown command" | |
| echo "$quickusage" |
NewerOlder