Library to json

For more compact json, use rough maps rather than objects