Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5107

java.util.UUID support in JsonBuilder

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.9-beta-4, 2.0-beta-1
    • 1.8.4, 2.0-beta-1
    • JSON

    Description

      Test.groovy
      uuid = '571afb98-3d0d-4dec-b373-8f8d51849266'
      json = new groovy.json.JsonBuilder(UUID.fromString(uuid))
      assert json.toString() == "\"${uuid}\""
      
      Output
      assert json.toString() == "\"${uuid}\""
             |    |          |      |
             |    |          false  571afb98-3d0d-4dec-b373-8f8d51849266
             |    {"leastSignificantBits":-5515907281477922202,"mostSignificantBits":6276605661972090348}
             {"leastSignificantBits":-5515907281477922202,"mostSignificantBits":6276605661972090348}
      

      Attachments

        Activity

          People

            melix C├ędric Champeau
            jonny Jonny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: