How to get data object from json-ld response using



So I’m trying to use to get and store a json-ld response. However at the moment the data object in the result is null. The content string though is populated with the full response.

The docs suggest this is due to meteor not being able to understand that this is still a json file:

data Object or null
If the response headers indicate JSON content, this contains the body of the document parsed as a JSON object.

This is the header for the Content-Type I’m getting back:

Content-Type →application/ld+json;charset=UTF-8

Any way to make it handle json-ld correctly?


As a workaround I’m parsing the content field with EJSON.parse();


I have the same problem with maxmind response, it is stated in their response header:

content-type: "application/; charset=UTF-8; version=2.1"

which is not interpreted by as valid Json type… So I have to manually parse the content. Not a big deal, but it seem there is a bug


I’m not sure that RFC 6839 has been approved for +json. However, if it’s being widely used it may make sense to adopt it into Meteor.

It looks like a relatively small change to the http package:

Why not submit a PR?