datamininggroup / pfa

Portable Format for Analytics
http://dmg.org/pfa/
27 stars 8 forks source link

Typo in Example 7.2 - creating a map #11

Closed jthompson6 closed 8 years ago

jthompson6 commented 8 years ago

This is the example for creating a map with the "new" special form.

It looks like the type definition was copied from the array example, so it says

{"new": {"p0": 1, "p1": "x", "p2": {"**": ["x", 2]}},
 "type": {"type": "array", "items": "double"}}

when it should say

{"new": {"p0": 1, "p1": "x", "p2": {"**": ["x", 2]}},
 "type": {"type": "map", "values": "double"}}
jpivarski commented 8 years ago

This is not an enhancement, but a bug-fix in the specification. The text surrounding the example indicates that it's supposed to be a map. Also, the JSON under the "new" field wouldn't be valid for type "array"; it has to be a "map" or "record".

There was an issue using \change (the trackchanges LaTeX package) to mark this change. I couldn't fix it--- it has something to do with nesting begin-end blocks inside a regular command (why does LaTeX have two types of commands?!?), so I gave up and went old school: the old text is commented out, the new text is added, and this is surrounded by a comment indicating editor and date.

jthompson6 commented 8 years ago

Thanks.