-
Notifications
You must be signed in to change notification settings - Fork 143
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
Open to new serializer features? #52
Comments
All the features are pretty interesting and seems like good to have in SimpleJson but I also don't want to increase the complexity of SimpleJson. Out of curiosity I would want to know what you are using SimpeJson for (client/server or any other details)? |
I am using it to serialize random unknown objects in our Exceptionless client. I need to be able to allow people to set exclusions and also to set serialization depth. I started taking a look at implementing this, but, because the entire code base is static, there doesn't appear to be a way to keep track of the current serialization depth without making a decent amount of changes. |
@ejsmith totally makes sense to add SerializationDepth in your case. This was originally a fork from a different json parser library written in .NET 1.0 using hashtables and arraylist without generics, so definitely needs a lot of work on the api surface. Also one of the main reason why SimpleJson hasn't made it to v1 release is due to fact that I haven't been happy with the public api yet. I do think interface IJsonSerializerStrategy {
int SerializationDepth { get; }
bool TrySerializeNonPrimitiveObject(object input, out object output);
object DeserializeObject(object value, Type type);
} I'm very much open to this interface being changed even though it would cause breaking change. (one reason why SimpleJson is still in alpha 😃 ) this also means we need to add Feel free to post your thoughts on the interface. |
I added pretty printing in about 25 lines. It would be nice if that was a serialization option too. |
I would like to implement the ability to do the following things while serializing objects:
These seem like general purpose features, but I also understand that you don't want to have feature bloat. Would you guys be open to accepting a pull request like this?
The text was updated successfully, but these errors were encountered: