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

JsonBuilder throws StackOverflow when using java.time.*

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 2.4.12
    • Fix Version/s: None
    • Component/s: JSON
    • Labels:
      None

      Description

      Running:

      import groovy.json.JsonBuilder
      import java.time.*
      
      def localDate = LocalDate.now()
      JsonBuilder builder = new JsonBuilder()
      builder {
          date localDate
      }
      
      builder.toString() // thrown here
      

      Produces:

      java.lang.StackOverflowError
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                erichelgeson Eric Helgeson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: