codeconsole commented on PR #16414: URL: https://github.com/apache/grails-core/pull/16414#issuecomment-6007979194
@jdaugherty This PR doesn't change parsing. `JSON.parse`, `request.JSON` and `new JSONObject(String)` still go through Grails' `JSONTokener`. The only parser it touched was the JavaCC `JSONParser`, which nothing in Grails calls. Everything in the Grails column of your table still holds, and fea8b9b294 pins it in `JsonParsingSpec`: - single quotes, comments, unquoted values and `TRUE` - `=>`/`;` separators, trailing commas and `[1,,2]` - octal numbers, numeric keys, `\x41` and `new Date(0)` - duplicate keys, trailing content, and rejecting a line break inside a string - the `Integer`/`Long`/`BigInteger`/`Double`/`BigDecimal` selection (`1.00` keeps its scale) - the `Map`/`List` containers For what the PR does change, which is writing: - 2493e1e9d4: `grails.converters.json.legacy: true` renders JSON as Grails 8 did. It uses Grails 8's marshallers, both of Grails 8's pretty-print layouts, and no domain module on the application's `JsonMapper`. It's deprecated for removal in 10 and logs a warning. `Grails8JsonRenderingSpec` compares it byte for byte with text rendered by 8.0.x, for 111 values and both pretty-print paths. - 64e1733f58: nothing is deleted any more. The JSON value marshallers, `PrettyPrintJSONWriter` and `JSONParser` are back, deprecated for removal in 10. rest-client-legacy's `RestBuilder` creates a `ByteArrayMarshaller`, and apps import `JSONParser`. - The upgrade guide lists every output difference from 8.0.x, measured against that same 8.0.x text: `OffsetTime`, `Month`, `char`, `byte[]`, `UUID`/`URI`/`@JsonValue` types, `Locale`, `Optional` and the pretty-print layout. It shows the `registerObjectMarshaller` line that keeps the old format of each. So an app can move to 9 with one setting and drop it type by type before 10. If you'd still like this on dev@ before it merges, I'll start the thread. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
