popolo-project / popolo-spec

International legislative data specifications
http://www.popoloproject.com/
99 stars 18 forks source link

JSON-LD profile for "simple" serialization / RFC 7284 #63

Closed akuckartz closed 10 years ago

akuckartz commented 10 years ago

See RFC7284 (http://tools.ietf.org/html/rfc7284). A common solution with https://github.com/OpenGovLD/specs/issues/31 might make sense.

One aspect which could be considered for such a profile:

Until a unique, standard approach to language tagging emerges for JSON, to simplify the JSON response, if no Accept-Language header is present, the API should respond with content in the single, default language. If an Accept-Language header is present, it should respond with content in a preferred language where possible, and use the default language otherwise.

http://popoloproject.com/appendices/multilingualization.html

jpmckinney commented 10 years ago

How would you see this being used? I'm not very familiar with that RFC.

akuckartz commented 10 years ago

That RFC is only a few days old and was written by one of the JSON-LD specification auhors. The intended use is to enable the definition and requests of specific forms of JSON-LD documents similar to the "expanded" or "flattened" profiles defined in the JSON-LD specification: http://www.w3.org/TR/json-ld/#iana-considerations

I was informed about that RFC during a technical conflict in the OParl community regarding possible restrictions on JSON-LD to enable the use as "simple" JSON by non-programmers etc. I am not absolutely convinced that this can solve such issues, but it might be worth an attempt.

jpmckinney commented 10 years ago

This seems more like an API concern; Popolo only worries about data formats. The appendices are not normative; content is added there based on several people asking the same questions. The only normative content is under /specs/. In any case, HTTP Accept-Language is already a good, established method for multilingual APIs; I don't think we need to use the recent profiles for that. I'll close this issue, unless you see the RFC having an impact on data formats. Popolo already uses JSON Schema to promote simpler JSON output.