TrueWill (14) [Avatar] Offline
#1
This is really pedantic, but in 1.4.6 Objects (MEAP V03) the book implies that this is JSON:

{name: "Charlie", age: 55, employed: true, childrenNames: ["Ruth", "Charlie Jr."]}


Technically it isn't. JSON requires that the name strings be quoted.

I think the technical term for what the book lists is object initializer.

That said, I suspect d3.json() expects JSON format.

References: http://jsonlint.com/ http://www.json.org/ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
elijah.meeks (123) [Avatar] Offline
#2
Ah, you're right, and that's not being pedantic, it's a good catch. That's just a js object... I might as well start dropping functions in there... Will fix.
506071 (1) [Avatar] Offline
#3
Agree. Technically it isn't. JSON requires that the name strings be quoted.
References: JSON Formatter https://jsonformatter-online.com