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

Cards payload quotations and the standard #644

Closed
randohinn opened this issue Aug 22, 2018 · 6 comments
Closed

Cards payload quotations and the standard #644

randohinn opened this issue Aug 22, 2018 · 6 comments

Comments

@randohinn
Copy link
Contributor

randohinn commented Aug 22, 2018

Hello. I'm writing a MobileDoc renderer in PHP. However, php really does not like to decode from json, when keys do not have quotation marks around them... Eg, this fails if I don't surround src in quotes.

  "cards": [
    ["image", {
        "src": "http://google.com/logo.png"
    }]
],

I was wondering, is the quotation marks something one can configure in the kit output, or how much "in-spec" they are with the MobileDoc standard? If these are not configurable, I suggest making it so they are 😄.

@randohinn
Copy link
Contributor Author

Found workaround on PHP side

@mixonic
Copy link
Contributor

mixonic commented Aug 22, 2018

@randohinn All Mobiledocs should be valid JSON. If it ain't JSON, it ain't Mobiledoc.

If you're seeing something to the contrary, please let me know!

@randohinn
Copy link
Contributor Author

@mixonic Yup, the cards examples in mobiledoc.md, which describes the format, and iirc, also the atoms section there has unquoted examples.

@randohinn
Copy link
Contributor Author

Reopening as this JSON fault still exists in the docs. https://github.com/bustle/mobiledoc-kit/blob/master/MOBILEDOC.md under Card definition signature.

@mixonic
Copy link
Contributor

mixonic commented Aug 31, 2018

Closed by #645, feel free to re-open if I am missing something.

@randohinn
Copy link
Contributor Author

This has not been automatically closed, apparently. There are some more JSON errors in the examples, but I'll have to pass on fixing them, on account of not having the time right now. However, I'd be really happy, if someone could point out all the unsupported features in my renderer so I'd have basis on refactoring it a bit.

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