go.reporter is a Golang library for parsing Reporter-App JSON files.
- Full support for all fields in all JSON versions.
- Supports both version of the JSON schema.
- Allows reading JSON from a string, the local filesystem, or Dropbox.
import "github.com/robbiet480/go.reporter"
Check out the examples in example_test.go
. For full documentation, see the Godocs.
To use this library with Dropbox, you will need to make a new Dropbox app. You must set the permissions to allow full Dropbox access. If you want, you can further limit access from the created app by only allowing it access to text files (JSON is covered in that category). Once you have done this, follow these instructions to generate an access token for your own account.
This library provides compatibility with both versions of the Reporter JSON schema. The differences that I have noticed are:
- Timestamps are expressed as seconds since Apple Epoch (January 1st, 2001, 00:00:00 UTC)
- There were no
uniqueIdentifiers
anywhere. - Some metadata variables are missing in version two (the latest), such as
dwellStatus
andsync
.
go test
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Make sure
golint
andgo vet
run successfully. go fmt
your code!- Commit your changes (
git commit -am "Add some feature"
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request