Thread overview
[Issue 9484] New: Syntax error in JSON output
Feb 08, 2013
Sönke Ludwig
Feb 08, 2013
Jacob Carlborg
Feb 08, 2013
Sönke Ludwig
Feb 08, 2013
Andrej Mitrovic
Feb 08, 2013
Andrej Mitrovic
Feb 08, 2013
Sönke Ludwig
Feb 08, 2013
Andrej Mitrovic
Feb 11, 2013
Walter Bright
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484

           Summary: Syntax error in JSON output
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: sludwig@outerproduct.org


--- Comment #0 from Sönke Ludwig <sludwig@outerproduct.org> 2013-02-08 07:22:45 PST ---
The "aliases" field in "kind":"import" entities uses square brackets (JSON array), but then uses key-value-pairs. It should use curly braces instead.

Example:


{
    "name" : "std.internal.digest.sha_SSSE3",
    "kind" : "import",
    "line" : 145,
    "protection" : "private",
    "aliases" : [
     "transformSSSE3"
    ]
}

(import in std.digest.sha)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484


Jacob Carlborg <doob@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob@me.com


--- Comment #1 from Jacob Carlborg <doob@me.com> 2013-02-08 07:28:31 PST ---
I don't see what's wrong with the above JSON.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484



--- Comment #2 from Sönke Ludwig <sludwig@outerproduct.org> 2013-02-08 07:30:40 PST ---
Sorry, missed the right line, right one:

   {
    "name" : "core.cpuid",
    "kind" : "import",
    "line" : 144,
    "protection" : "private",
    "aliases" : [
     "hasSSSE3Support" : "ssse3"
    ]
   }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-08 07:36:25 PST ---
(In reply to comment #2)
> Sorry, missed the right line, right one:
> 
>    {
>     "name" : "core.cpuid",
>     "kind" : "import",
>     "line" : 144,
>     "protection" : "private",
>     "aliases" : [
>      "hasSSSE3Support" : "ssse3"
>     ]
>    }

If I'm not mistaken it should be this:

    "name" : "core.cpuid",
    "kind" : "import",
    "line" : 142,
    "protection" : "private",
    "aliases" : [
     {
      "hasSSSE3Support" : "ssse3"
     }
    ]

Is that ok?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-08 07:37:02 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > Sorry, missed the right line, right one:
> > 
> >    {
> >     "name" : "core.cpuid",
> >     "kind" : "import",
> >     "line" : 144,
> >     "protection" : "private",
> >     "aliases" : [
> >      "hasSSSE3Support" : "ssse3"
> >     ]
> >    }
> 
> If I'm not mistaken it should be this:
> 
>     "name" : "core.cpuid",
>     "kind" : "import",
>     "line" : 142,
>     "protection" : "private",
>     "aliases" : [
>      {
>       "hasSSSE3Support" : "ssse3"
>      }
>     ]
> 
> Is that ok?

Also a comma after the }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484



--- Comment #5 from Sönke Ludwig <sludwig@outerproduct.org> 2013-02-08 07:40:19 PST ---
Looks like the most reasonable solution.

Your snipped looks right to me, no comma missing AFAICS.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |json, pull
         AssignedTo|nobody@puremagic.com        |andrej.mitrovich@gmail.com


--- Comment #6 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-08 07:42:18 PST ---
https://github.com/D-Programming-Language/dmd/pull/1642

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484



--- Comment #7 from github-bugzilla@puremagic.com 2013-02-10 20:03:13 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1801f6f165f03e093a18a4cf699fef64d51cd364
Fixes Issue 9484 - Selective and Renamed symbol imports should be
separate.

https://github.com/D-Programming-Language/dmd/commit/52a4fe55e9df164a98f756502fd586bbf9ae8f4b Merge pull request #1642 from AndrejMitrovic/Fix9484

Issue 9484 - Selective and Renamed symbol imports should be separate.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9484


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------