We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When serializing an object of the following annotated class, the resulting JSON has not all the properties in an alphabetic order.
/** * @JMS\AccessorOrder("alphabetical") * @JMS\XmlRoot("Test") */ class Test { /** * @JMS\SerializedName("Name") * @JMS\Type("string") */ protected $Name = ""; /** * @JMS\SerializedName("Id") * @JMS\Type("integer") */ protected $Id = ""; /** * @JMS\SerializedName("Ip") * @JMS\Type("string") */ protected $Ip = ''; /** * @JMS\SerializedName("InterfaceList") * @JMS\XmlList(inline = false, entry = "Interface") * @JMS\Type("array<string>") */ protected $interfaces = array(); ... }
Result:
{ "Id": "", "Ip": "", "Name": "", "InterfaceList": [ ... ] }
I tested only with an array but for an ArrayCollection the behaviour might be the same.
The text was updated successfully, but these errors were encountered:
May the @AccessOrder Attribute could help you?
Sorry, something went wrong.
May the @accessorder Attribute could help you?
No branches or pull requests
When serializing an object of the following annotated class, the resulting JSON has not all the properties in an alphabetic order.
Result:
I tested only with an array but for an ArrayCollection the behaviour might be the same.
The text was updated successfully, but these errors were encountered: