0

Using the Contentful .NET SDK, I want to retrieve the raw JSON representation of an entry rather than serializing that JSON to an object. Is it possible?

I looked at GetEntry() and GetEntries() in https://github.com/contentful/contentful.net/blob/master/Contentful.Core/ContentfulClient.cs. Passing JObject or string as the generic doesn't seem to work. I would prefer to avoid hacking the SDK or invoking the RESTful endpoint without the SDK.

Update 1 10.July.2020: or does Contentful provide a default class to represent entries, where that class might expose the raw JSON?

1 Answers1

0

There is currently no option to get the exact raw json. You could use a JObject as you're suggesting but the SDK would still do some link resolving etc. so the structures wouldn't exactly match.

Simplest solution would be using an HttpClient and make the call yourself.

Robban
  • 6,729
  • 2
  • 39
  • 47