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
public function testEmptyArray() { $serializer = SerializerBuilder::create()->build(); $ymlContent = $serializer->serialize(array('t' => array()), 'yml'); echo $ymlContent; // prints t: // Symfony Yaml component print_r(Yaml::parse($ymlContent)); print_r(Yaml::parse('t: []')); }
Running the test get:
t: Array ( [t] => ) Array ( [t] => Array ( ) )
Is this expected behavioral? Any way to configure it to serialize empty array as []?
Or is bug and should try to fix it in the code and open PR?
The text was updated successfully, but these errors were encountered:
Looks like another inconsistency in serialization representation. In JSON empty arrays are serialized. See also #124
Sorry, something went wrong.
@entering @Tobion I wrote a PR to fix it. If you could please take a look. 👍
No branches or pull requests
Running the test get:
Is this expected behavioral? Any way to configure it to serialize empty array as []?
Or is bug and should try to fix it in the code and open PR?
The text was updated successfully, but these errors were encountered: