groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Boekhold <boekh...@gmx.com>
Subject JsonBuilder and all-caps field names
Date Wed, 28 Oct 2015 08:43:59 GMT
Hi,

the following works:

    def builder = new JsonBuilder()
    builder {
         HEADER {
             field 'value'
         }
    }


But the following gives me a compile error:

    def builder = new JsonBuilder()
    builder {
         HEADER {
             FIELD 'value'
         }
    }


"Groovyc: unexpected token: value"

Why is that? groovy 2.4.4 btw.

Maarten



Mime
View raw message