Closed dswd closed 9 years ago
Oh, huh. I never noticed that the JSON spec did that, and there's no indication anywhere in the spec that there's a convention attached to it. The rest of a railroad diagram is pretty self-explanatory.
I could certainly do this, but I think I'd prefer seeing if there's a reference anywhere else to this being a recognized practice in railroad diagrams.
What are you planning to use the distinction for?
I had always assumed the distinction was if the diagram didn't contain subtypes. So number and string don't contain anything but low level characters where as objects, arrays and values I would consider "composite types" where they are comprised of multiple other diagrams.
I would like this for the diagrams I have been building at: http://jetson.io
Hm, all right, that seems consistent. Yeah, I'm okay with this. I'll accept a PR if I don't get to it soon.
I wrote the code for the single lines the other day, just trying to think of the best way to hook that up to the diagram function, my two ideas were:
Diagram
Diagram
as ComplexDiagram
Just thought it was worth updating you, hopefully to save your time.
@tabatkins let me know what you think.
It would be great if you could select whether to have single or doulbe lines as the begin and end indicators. I am not completely sure but I think that the authors of json.org used this to highlight which of the non-terminals can have whitespace between the components.