Aditya Mukerjee

Results 56 issues of Aditya Mukerjee

This came up in https://github.com/ChimeraCoder/anaconda/pull/187. ```json [ { "id": "1", "url": "https://united.fr/webhook", "valid": true, "created_timestamp": "134325325301" } ] ``` will create ```go type Foo []struct { CreatedTimestamp string `json:"created_timestamp"` ID...

This is particularly relevant now that Go 1.4 provides `go generate`. Currently, gojson handles nested objects by creating an anonymous struct. For example: ``` go type Repository struct { ArchiveURL...

discussion

```json { "value": 10.0, "timestamp": 147847894, } ``` `value` should be parsed as a float64, but `timestamp` should be an int64. This comes from @nstogner: (https://github.com/ChimeraCoder/gojson/pull/22#issuecomment-248996855) > > To elaborate...

@AeroNotix and @Skelterjohn point out that in some cases it may be preferable to have distinct named types for struct fields instead of using embedded structs. (See the #go-nuts conversation...

enhancement

Most of the other fields are converted in `CamelCase` with the first character capitalized (so it is exported). I can't think offhand of why this is being translated like this,...

discussion

Just discovered this quirk: If a JSON object contains the field `"3ED"`, it will be translated to the unexported field `_ED`. If the object contains both `"3ED"` and `"4ED"`, _both_...

bug

This is inspired by #17. A number of APIs, such as Reddit and Hacker News, return heterogenous results, with a special field (`kind` or `type`) that indicates which type it...

As of go `1.1`, `json.Unmarshal` no longer produces an error when attempting to unmarshal a possibly null value into JSON. This was patched with https://codereview.appspot.com/6759043 This was probably introduced with...

enhancement

Currently, the README does not explain the issue regarding null values (only valid for pointers) and it's not clear that users are (currently) expected to manually edit `[]interface{}` to be...

Since the functionality of 'go fmt' is [provided as a function in the standard library](http://golang.org/pkg/go/format/), gojson should be able to generate properly formatted output as a file, instead of requiring...