Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8068872

Nashorn JSON.parse drops numeric keys

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        FULL PRODUCT VERSION :
        openjdk version "1.8.0_40-internal"
        OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
        OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Linux 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

        A DESCRIPTION OF THE PROBLEM :
        JSON.parse drops numeric properties in certain cases, apparently when they are not in increasing order.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        $ jjs
        jjs> JSON.stringify(JSON.parse('{"5": true, "3": "a"}'))
        {"3":"a"}

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        $ jjs
        jjs> JSON.stringify(JSON.parse('{"5": true, "3": "a"}'))
        {"3":"a", "5": true}

        REPRODUCIBILITY :
        This bug can be reproduced always.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hannesw Hannes Wallnoefer
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: