Bug 9484 – Syntax error in JSON output

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-08T07:22:00Z
Last change time
2013-02-10T20:17:17Z
Keywords
json, pull
Assigned to
andrej.mitrovich
Creator
sludwig

Comments

Comment #0 by sludwig — 2013-02-08T07:22:45Z
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)
Comment #1 by doob — 2013-02-08T07:28:31Z
I don't see what's wrong with the above JSON.
Comment #2 by sludwig — 2013-02-08T07:30:40Z
Sorry, missed the right line, right one: { "name" : "core.cpuid", "kind" : "import", "line" : 144, "protection" : "private", "aliases" : [ "hasSSSE3Support" : "ssse3" ] }
Comment #3 by andrej.mitrovich — 2013-02-08T07:36:25Z
(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?
Comment #4 by andrej.mitrovich — 2013-02-08T07:37:02Z
(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 }
Comment #5 by sludwig — 2013-02-08T07:40:19Z
Looks like the most reasonable solution. Your snipped looks right to me, no comma missing AFAICS.
Comment #6 by andrej.mitrovich — 2013-02-08T07:42:18Z
Comment #7 by github-bugzilla — 2013-02-10T20:03:13Z
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.