I've actually seen a few people use custom content types for it but not defacto standard has emerged for newline delimited JSON as a content-type.
Just use 'x-my-json-sucka' or whatever, just preface with x- On May 23, 2012, at May 23, 20122:10 PM, Joshua Holbrook wrote: > Newline-delimited JSON is pretty common. I don't think there's a > standard content-type for it though. > >> Stay with the standard. > > Well, this *is* the standard, just combined with newline-delimited streaming. > > --Josh > > On Wed, May 23, 2012 at 2:05 PM, Mark Hahn <[email protected]> wrote: >> Stay with the standard. Crockford has made it clear that the standard will >> never change. It is one of json's strengths. You can count on the fact >> that what you do now will work forever. >> >> >> On Wed, May 23, 2012 at 1:47 PM, Ken <[email protected]> wrote: >>> >>> There seem to be a growing number of tools & packages around that >>> implement some form of JSON streaming where multiple standard JSON objects >>> are delimited by extra newlines, e.g. >>> >>> { "id": 1, "foo": "bar" } >>> { "id": 2, "foo": "baz" } >>> ... >>> >>> This format seems both pragmatic and useful, but is not JSON compliant >>> (i.e. doesn't parse with a standard JSON parser), so it seems inappropriate >>> to serve up as "application/json". Request-JSONStream uses >>> "application/jsonstream", Google searching shows at least one use of >>> "application/x-json-stream", and there are a number of services that use >>> "application/json" and expect clients to just deal with it (cf. >>> https://github.com/senchalabs/connect/issues/538). >>> >>> Since I'm about to make heavy use of this technique in a way that will be >>> a little difficult to unwind later I'd like if at all possible get on board >>> with whatever will become the standard (defacto or official). Anyone aware >>> of any efforts underway to standardize this, or packages/services that have >>> enough momentum to drive a standard in the future? >>> >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en > > > > -- > Joshua Holbrook > Engineer > Nodejitsu Inc. > [email protected] > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
