Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-line JSON parsing #5

Open
tonyfast opened this issue Mar 12, 2015 · 1 comment
Open

In-line JSON parsing #5

tonyfast opened this issue Mar 12, 2015 · 1 comment

Comments

@tonyfast
Copy link

A really nice way to augment an Archie document is to add existing data. I was curious if being able to add single line minified JSON support to archie would work?

Archie already recognizes the braces as triggers. If it could recognize a line was json and push that to the scope.

@abstrctn
Copy link
Contributor

One of the ideas of ArchieML is to keep writers from getting surprised with how the document gets parsed, and I think allowing it to parse anything that looks like a JSON object as data might confuse people. I could also see people wanting to include JSON-like text and have it be treated as a comment, just like plain text:

Note, paste the following line into the CMS to turn on the slideshow:
{"testing": "data", ... }

I'd normally suggest just merging in the JSON after parsing; is there an example where you'd find it better to include it in a source AML document?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants