.NET GetJSON operation throws null reference exception

When I try to perform a GetJSON operation for a key that doesn’t have any data associated with it, I get a null reference exception. Is this the expected behaviour? Looking at the source for the .NET client it seems that a null check is performed, but too late.

Hi,
we are having the same problem using the generic version GetJson.

It seems like the new client needs a property “id”, if not json.net in the couchbase client throws an exception.

Hi Mathew -

I am looking into this and can validate the exception via a simple unit test, however I am hesitant to call it a bug and think that it may be the expected behavior. I’ll dig a bit deeper and see what I come up with.

-Jeff

The expected response value should be null instead of the exception. I created a jira ticket for this issue: https://www.couchbase.com/issues/browse/NCBC-306.

-Jeff