Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to use ServiceStack json serializer #34

Closed
ghost opened this issue Feb 16, 2012 · 5 comments
Closed

option to use ServiceStack json serializer #34

ghost opened this issue Feb 16, 2012 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2012

The ServiceStack json serializer is significantly faster than Newtonsoft's: http://www.servicestack.net/benchmarks/

We're looking to use Riak for logging and we need to get past some perf bottlenecks to do this. Faster serialization will be crucial.

@peschkaj
Copy link
Contributor

I'll take a look into what it will take to add this. Right now I'm moving to finalize a few minor tweaks to push a functional 1.0 out the door. Changing out the serializer will be a bit of work - it'll be a 1.1 type of thing.

@peschkaj
Copy link
Contributor

You know, I think I misunderstood... Are you looking for an option to serialize your C# objects using ServiceStack.NET?

@ghost
Copy link
Author

ghost commented Feb 21, 2012

Yes, I'd like to use ServiceStack.Net to serialize my objects instead of Newtonsoft.

@peschkaj
Copy link
Contributor

Since ServiceStack.Net doesn't implement and BCL interfaces, what we can do is supply GetObject and SetObject methods that accept a delegate so you can pass in a function reference that will produce an appropriately encoded string. Ultimately, of course, it doesn't matter if you're making JSON, XML, ProtocolBuffers, or brainf*ck code, so the method will likely look like SetObject(T object, string mimeType, Delegate magicalDelegate).

Does that meet your needs?

@peschkaj
Copy link
Contributor

Implemented a fix for this in commit c6d55b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant