Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a test for the basic line chart example from echarts. I got the chart options from the link in the test and converted them to json. I also converted the charming chart to json and compared them with each other.
If both comparisons are the same this library is serializing correctly.
After I implemented the test, I noticed this is not the case.
Vec<T>
with only one element should be serialized asT
. The second commit addresses this issue for thex_axis
andy_axis
by usingserde_as
PreferOne
.In following PRs I will correct this behaviour for the remaining fields.
The main focus of this PR is the test and how we are testing the correct serialization.