You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Helgeson (Jira)" <ji...@apache.org> on 2019/10/15 21:49:00 UTC
[jira] [Created] (GROOVY-9279) StreamingJsonBuilder adding extra
comma
Eric Helgeson created GROOVY-9279:
-------------------------------------
Summary: StreamingJsonBuilder adding extra comma
Key: GROOVY-9279
URL: https://issues.apache.org/jira/browse/GROOVY-9279
Project: Groovy
Issue Type: Bug
Components: JSON
Affects Versions: 2.5.8, 2.5.7
Reporter: Eric Helgeson
This test passes in Groovy 2.5.6 - but not in 2.5.7/8:
[https://github.com/grails/grails-core/blob/beafdce14d05f15abb18a079f9bb681f8761fe45/grails-plugin-rest/src/test/groovy/org/grails/plugins/web/rest/render/VndErrorRenderingSpec.groovy#L74-L109]
Code where the error happens:
[https://github.com/grails/grails-core/blob/7ab9e47ad805fbeb9433a488dd33f91bef44c0fa/grails-plugin-rest/src/main/groovy/grails/rest/render/errors/VndErrorJsonRenderer.groovy#L56-L75]
The JSON produced includes an extra comma:
{code:java}
,"_links":{(,)"resource":{(,)"href":"http://localhost/books/1"}}},{"logref":"book.title.bad.1","message":"Title Bad","path":"http://localhost/books/1","_links":{(,)"resource":{(,)"href":"ht ,"_links":{(-)"resource":{(-)"href":"http://localhost/books/1"}}},{"logref":"book.title.bad.1","message":"Title Bad","path":"http://localhost/books/1","_links":{(-)"resource":{(-)"href":"ht
{code}
To change the Groovy version for this project you can set it here - [https://github.com/grails/grails-core/blob/master/build.gradle#L31]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)