sheriff
sheriff copied to clipboard
Conditional marshalling for Go
Invalid when tag is used ``` Test int64 `json:"test,string"` ``` tag `string` invalid
Hi, I found a bug when a structure having method. For the example, Find the `User` struct in sample code ``` type User struct { Username string `json:"username" groups:"api"` Email...
Hi ! All in the title, it can be great to have an option to recursively apply groups on childs when the field is an Struct.
It is great to see people actually realize we need something work like sheriff in Golang's world. As a Symfony developer too I enjoy JMSSerializationBundle very much on serializing and...
Fixes panic when `sheriff.Marshal` called with a nil pointer.
pinging @lombare @simaotwx @TorbenCK @mandeepji We have several conflicting opinions about how to handle nil and/or empty maps/slices: see the following PRs: - #37 - #38 - #39 - #40...
As we use a lot of pointers in our response structs, I also added a pointer marshal test for different types and the result with sheriff.Marshal is exactly the same...
see #42 for discussion
There is current support for structs that have a json marshaller in the form or ``` func (c Custom) MarshalJSON() ([]byte, error) { ``` However this does not work with...
Fixes struct marshalling for embedded structs when a `json` tag is specified. Currently the following case works, and produces the same result as `json.Marshal` ``` type EmbeddedParent struct { *EmbeddedChild...