Search code examples
genericsjson.netcouchbase-lite

couchbase lite .net and typed objects


I'm trying to use couchbase lite in an app but I can't get the hang of creating a document from an object.

All I see is a PutProperties method expecting a dictionary, but I don't have dictionaries. I have normal typed objects.

Is there any way to get couchbase lite to accept such an object? Failing that, is there nay way to get couchbase lite to accept a string and interpret this as a json document? Then I could use newtonsoft.json to serialize the objects and pass them in.

Lots of Greetings!


Solution

  • At the moment these features are roughly planned (the first one is more talked about than the second, but the second has been mentioned). Right now the focus on .NET is feature parity with the other platforms (Objective-C and Android / Java) since it was the last out of the gate. In 2.0 we would like to see this feature realized. The current version in development is 1.2 and it's possible that the release after that will be 2.0, but I don't think that is confirmed yet. Keep in mind that this answer should not be taken as fact as it is discussing future development and is subject to change for any number of reasons (not the least of which is demand for a certain feature). In the meantime, if you would like to see this feature the best thing to do would be to file an issue on GitHub about it.