← Back to index
|
Original Bugzilla link
Bug 15273 – json.d parseJSON doesnt parse current json string
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2015-11-02T12:19:36Z
Last change time
2023-03-22T16:29:03Z
Assigned to
No Owner
Creator
Alexander
Comments
Comment #0
by a_perfilev — 2015-11-02T12:19:36Z
jsonValue is empty after parseJSON Here is code example: import std.json; public static void main() { string jsondata = "{\"results\":[{\"paramName\":\"GeoEnrichmentResult\",\"dataType\":\"GeoEnrichmentResult\",\"value\":{\"version\":\"2.0\",\"FeatureSet\":[{\"displayFieldName\":\"\",\"fieldAliases\":{\"OBJECTID\":\"Object ID\",\"ID\":\"ID\",\"sourceCountry\":\"sourceCountry\",\"HasData\":\"HasData\",\"TOTPOP\":\"Total Population\",\"TOTHH\":\"Total Households\",\"TOTMALES\":\"Male Population\",\"TOTFEMALES\":\"Female Population\",\"AVGHHSZ\":\"Average Household Size\"},\"fields\":[{\"name\":\"OBJECTID\",\"type\":\"esriFieldTypeOID\",\"alias\":\"Object ID\"},{\"name\":\"ID\",\"type\":\"esriFieldTypeString\",\"alias\":\"ID\",\"length\":256},{\"name\":\"sourceCountry\",\"type\":\"esriFieldTypeString\",\"alias\":\"sourceCountry\",\"length\":256},{\"name\":\"HasData\",\"type\":\"esriFieldTypeInteger\",\"alias\":\"HasData\"},{\"name\":\"TOTPOP\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Total Population\",\"fullName\":\"KeyGlobalFacts.TOTPOP\",\"component\":\"demographics\",\"decimals\":0,\"units\":\"count\"},{\"name\":\"TOTHH\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Total Households\",\"fullName\":\"KeyGlobalFacts.TOTHH\",\"component\":\"demographics\",\"decimals\":0,\"units\":\"count\"},{\"name\":\"TOTMALES\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Male Population\",\"fullName\":\"KeyGlobalFacts.TOTMALES\",\"component\":\"demographics\",\"decimals\":0,\"units\":\"count\"},{\"name\":\"TOTFEMALES\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Female Population\",\"fullName\":\"KeyGlobalFacts.TOTFEMALES\",\"component\":\"demographics\",\"decimals\":0,\"units\":\"count\"},{\"name\":\"AVGHHSZ\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Average Household Size\",\"fullName\":\"KeyGlobalFacts.AVGHHSZ\",\"component\":\"scripts\",\"decimals\":2,\"units\":\"count\"}],\"features\":[{\"attributes\":{\"OBJECTID\":1,\"ID\":\"0\",\"sourceCountry\":\"US\",\"HasData\":1,\"TOTPOP\":318536439,\"TOTHH\":120746349,\"TOTMALES\":156936483,\"TOTFEMALES\":161599956,\"AVGHHSZ\":2.57}}]}]}}],\"messages\":[]}"; JSONValue jsonValue = parseJSON(jsondata); }
Comment #1
by a_perfilev — 2023-03-22T16:29:03Z
This issue is not reproducible anymore. Please close