Conversation
cff4e97 to
588157c
Compare
| "preserve field ordering" in { | ||
| val model = Model(Some("foo"), "bar", Some(1.2), 42, Some("baz")) | ||
| val serialized = Json.stringify(Json.toJson(model)) | ||
| serialized.mustEqual("""{"m1":"foo","c":"bar","z":1.2,"a":42,"b":"baz"}""") |
There was a problem hiding this comment.
| serialized.mustEqual("""{"m1":"foo","c":"bar","z":1.2,"a":42,"b":"baz"}""") | |
| serialized.mustEqual("""{"m1":"foo","c":"bar","z":1.2,"a":42,"b":"baz"}""") |
|
Would it make sense to test the field ordering at the I note the comment on the play-json/play-json/shared/src/main/scala/play/api/libs/json/JsValue.scala Lines 116 to 123 in 85a8aa0 [On the other hand: I can argue that a |
|
@Mergifyio rebase |
✅ Branch has been successfully rebased |
588157c to
c8946b3
Compare
|
The test now passes since #1038 got merged. There is a test in that PR as well but I will merge this one too. |
|
https://github.com/Mergifyio backport 3.0.x 2.10.x |
✅ Backports have been createdDetails
|
Pull Request Checklist
Purpose
This PR demonstrates #1038. The new test fails due to serialized field order when compiled with Scala 3: