Skip to content

sean-lynch/golang-json-experiment

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

golang-json-experiment

This project tests various mechanisms for parsing JSON in Go. Commentary on each here: http://sean.lyn.ch/2015/02/parsing-json-in-go/

To run:

$ godep restore
$ go build
$ ./golang-json-experiment

Classes of mechanisms

  • strict_struct.go - Parsing JSON into predefined structures. This includes structure definitions generated by: gojson, json-to-go, jflect, and json-to-struct
  • loose_struct.go - Dealing with JSON that is parsed into the empty interface.
  • wrapper.go - Using empty interface wrapping packages to handle type conversion. This includes: typed, go-simplejson, and jason
  • TODO compiled.go - Using tools to pre-compile JSON parsers for performance reasons.

Sample data

Sample JSON used to test is included as raw JSON and Paw project.

At this time, only one sample JSON set is included:

About

Experimenting with different ways of processing JSON in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages