Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string ToJson(this object obj)
- {
- var messageLite = obj as IMessageLite;
- if (messageLite != null)
- return Google.ProtocolBuffers.Extensions.ToJson(messageLite);
- return JsonConvert.SerializeObject(obj);
- }
Add Comment
Please, Sign In to add comment