Groovy
  1. Groovy
  2. GROOVY-5341

json implicit object of type JsonBuilder added to groovlets

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-3, 1.8.7
    • Component/s: Groovlet / GSP
    • Labels:

      Description

      groovlets have long had an implicit object of type MarkupBuilder called html, which is useful for writing out XML representations of objects. A similar object called json, of type groovy.json.JsonBuilder, was added to ServletBinding so that it is available in groovlets.

      Unlike MarkupBuilder, JsonBuilder only serializes its output but does not write it to the output writer. Expected usage, therefore, will be to use the builder and then use "out << json" or "print json" to write the result to the response.

        Activity

        Ken Kousen created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Assignee glaforge glaforge [ guillaume ]
        Component/s JMX [ 14662 ]
        Component/s Groovlet / GSP [ 11660 ]
        Component/s Grape [ 13810 ]
        Guillaume Delcroix made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-beta-3 [ 18244 ]
        Fix Version/s 1.8.7 [ 18317 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734264 ] Default workflow, editable Closed status [ 12745986 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971704 ] Default workflow, editable Closed status [ 12979492 ]

          People

          • Assignee:
            Guillaume Delcroix
            Reporter:
            Ken Kousen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development