Closed Samistine closed 6 years ago
@Samistine By default, this will get serialized as test_test
. Add your own naming strategy to override this behavior. Your implementation would just return the given name.
https://github.com/tebru/gson-php/blob/master/docs/Advanced.md#add-property-naming-strategy
Thanks, I don't think the java gson implementation works this way so I was confused
That was done because the common serializer in PHP converts the field names to snake case. I will consider adding support to the builder to allow passing in a value that will define the common strategies google/gson supports.
@Samistine This can be done more similarly to gson now
https://github.com/tebru/gson-php/blob/master/docs/Advanced.md#change-property-naming
So I can't seem to get it to deserialize variables that have capital letters in them without specifying the SerializedName annotation.
The following does not work.