-
-
Save ryanlowdermilk/1681337 to your computer and use it in GitHub Desktop.
var customer = new Customer { Name="Joe Bloggs", Age=31 }; | |
var json = JsonSerializer.SerializeToString(customer); | |
var fromJson = JsonSerializer.DeserializeFromString<Customer>(json); |
at ServiceStack.Text.JsonSerializer.SerializeToString[T](User value)
at IdeaStrike.library.IdeaWebRequest.Send(User user)
at IdeaStrike.library.IdeaActions.VoteUp(User user)
at IdeaStrike.library.IdeaAction.VoteUp(User user)
at IdeaStrike.client.phone.App.Application_Launching(Object sender, LaunchingEventArgs e)
at Microsoft.Phone.Shell.PhoneApplicationService.FireLaunching()
at Microsoft.Phone.Execution.NativeEmInterop.FireOnLaunching()
Looks like you're trying to use it in WP7?
I'd look at using this older port, someone else did a while ago:
http://csainty.blogspot.com/2011/10/using-servicestacktext-for-json.html
Yup - you're right. I called my Portable Class Library from a Console app and the above code worked just fine. Interesting. The Portable Class Library should work fine on Windows, Xbox and Phone.
Thanks for the help @mythz!!!
Yup - you're right. I called my Portable Class Library from a Console app and the above code worked just fine. Interesting. The Portable Class Library should work fine on Windows, Xbox and Phone.
Thanks for the help @mythz!!!
What's the StackTrace?