-
Notifications
You must be signed in to change notification settings - Fork 114
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
Index should use a common structured format (eg. JSON) #8
Comments
@lrosenthol are there any use cases you can think of that are not solved by HTTP style header mappings that JSON would be better at. I am hesitant to have custom JSON properties but SourceMaps have precedent of allowing this by If you want to write up a schema that would be great :). |
The main issues are (1) data typing and (2) containers/lists. if the data
isn't typed (eg. always treated as a string), you will introduce numerous
parsing and potential security risks. But if I know something is a number
(or boolean or ...), then the issues go away. Same with having a list of
things - each implementor need not write a parser (that might have security
flaws).
I'll look at doing a schema.
…On Thu, Dec 29, 2016 at 2:21 PM, Bradley Meck ***@***.***> wrote:
@lrosenthol <https://github.com/lrosenthol> are there any use cases you
can think of that are not solved by HTTP style header mappings that JSON
would be better at. I am hesitant to have custom JSON properties but
SourceMaps
<https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit>
have precedent of allowing this by x_* as a prefix. I also am concerned
about deeply nested objects but with any custom header it would be possible
to make the value itself an object, so that seems fine.
If you want to write up a schema that would be great :).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE1vNW4eaB8xap8i40pKwIfMR0jiuZ7jks5rNAgzgaJpZM4K1rU5>
.
|
#36 uses a CDDL grammar to define the index, so I think this is fixed. |
Having the index file be in a text-like format that (a) doesn't specify or mandate an encoding and (b) no provisions for proper data typing, (c) requires writing a custom parser and (d) will need a newly defined MIME type (see issue #9 ) - doesn't seem like a good idea.
I recommend instead that the index be a well defined JSON grammar. That way standard parsers can be used and there is no question about encodings, data types, etc.
The text was updated successfully, but these errors were encountered: