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

JsonBuilder throws StackOverflow when using java.time.*

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 2.4.12
    • None
    • JSON

    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

              Unassigned Unassigned
              erichelgeson Eric Helgeson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: