javascriptserializer Questions
1
I am porting my project to DNX-Core 5.0 and trying to get work but I cannot find the JavaScriptSerializer and AppSettingReader classes. I know the System.Web is removed and so please anyone help me...
Georgettegeorgi asked 14/5, 2015 at 14:16
3
Solved
I've created a C# ASP.NET method which simply takes a string property containing JSON, both inside the same class. My issue is that whenever I type the .Deserialize method (the commented line) Visu...
Gothurd asked 27/3, 2015 at 9:53
4
Solved
I have a class
public class Money
{
public string Currency { get; set; }
public decimal Amount { get; set; }
}
and would like to serialize it to JSON. If I use the JavaScriptSerializer I get
...
Pedicure asked 5/9, 2012 at 13:53
4
Solved
I am using JavaScriptSerializer for serializing objects to the file to the JSON format. But the result file has no readable formatting. How can I allow formating to get a readable file?
Infirm asked 4/5, 2011 at 9:18
1
Solved
I have the following data:
{"data":{"id":"7IaWnXo","title":null,"description":null,"datetime":1397926970,"type":"image/pn...
Nerine asked 19/4, 2014 at 17:22
1
I have a JSON object where the value of one element is a string. In this string there are the characters "<RPC>". I take this entire JSON object and in my ASP.NET server code, I perform the f...
Archibaldo asked 6/2, 2014 at 1:30
1
Solved
I have an MVC3 application running under .NET 4.0 and when I use JavascriptSerializer.Deserialize I'm getting an error.
Error during serialization or deserialization using the JSON JavaScriptSer...
Feverfew asked 11/12, 2013 at 15:41
2
Solved
Json string:
{"movies":[{"id":"1","title":"Sherlock"},{"id":"2","title":"The Matrix"}]}
C# class:
public class Movie {
public string title { get; set; }
}
C# converting json to c# list of Mo...
Farmann asked 13/2, 2012 at 2:36
2
Solved
I have my Entity Framework Entities split out into a separate class library from my web project and data access layer. In my controller I make a call to my repository to get an IEnumerable<Robot...
Social asked 28/1, 2013 at 19:2
1
Solved
Our client wanted to show the date and time values in the browser exactly as they are in the database, and we are storing them as UTC in the database.
At first we had some problems with the serial...
Keelby asked 12/6, 2013 at 15:29
2
Solved
Why does the following code return "[ ]" when it should return "{"id":1999, "title":"hithere"}
JavaScriptSerializer serializer = new JavaScriptSerializer();
StringBuilder sbJsonResults = new Str...
Grajeda asked 15/4, 2013 at 12:32
2
Solved
I have a field in the db that store a json string
and I want that when I return it in a json result that will be returned as json raw data and not warped with quotes as string.
UPDATE 1(More Info...
Peephole asked 27/3, 2013 at 14:34
2
Solved
Based on Diego's unanswered comment under the top-voted answer in this question:
JSON serialization of enum as string
So for an enum:
public enum ContactType
{
Phone = 0,
Email = 1,
Mob...
Univalent asked 19/2, 2013 at 17:55
2
Solved
I'm successfully using the JavaScriptSerializer in MVC3 to de-serialize a json string in to a dynamic object. What I can't figure out is how to cast it to something I can enumerate over. The foreac...
Studhorse asked 27/11, 2012 at 20:0
1
Solved
Deserializing a small, fixed size, fixed structure, with fixed field names, JSON string is easy: Just define a class that contains all the fields (with correct types and names, all known at compile...
Reinaldoreinaldos asked 25/10, 2012 at 15:51
2
Solved
I am using the following to deserialize a JSON string into my own class:
JavaScriptSerializer serializer = new JavaScriptSerializer();
Dictionary<string, object> x = (Dictionary<string, o...
Stationery asked 23/10, 2012 at 19:38
2
Solved
Having a problem where DateTime/TimeSpan doesn't seem to deserialize properly with JavaScriptSerializer.
When I get the Object back after deserializing the TimeSpan is empty and if I use DateTime t...
Avocado asked 8/12, 2010 at 1:37
1
Solved
I found that my webmethod is returning data as
{ "d":
[
{"id":"1","itemtxt":"Masters"},
{"id":"2","itemtxt":"Transactions"},
{"id":"3","itemtxt":"Misch. Reports"}
]
}
If you notice, the ar...
Bipartite asked 21/4, 2012 at 23:20
3
Solved
I have an asp.net-mvc website and i am reading in Json string from a Database. Here is the following json in a DB. It could look like this:
{"description": "Test", "contacts": ["[email protec...
Weber asked 13/4, 2012 at 13:20
1
I have a web service that contains one method:
[WebMethod]
public string Movies()
{
using (var dataContext = new MovieCollectionDataContext())
{
var query = dataContext.Movies.Select(m =>new...
Autonomic asked 28/3, 2012 at 20:1
2
Solved
Im reading this book but I JavaScriptSerializer from the System.Web.Script.Serialization namespace because it seems to be unavailable?
Absent asked 18/8, 2010 at 20:38
1
Solved
I am creating a asp.net 2.0 webservice which give json as output and there's a very large, can't be break down, dataset which exceed the max length limit
I have search on the internet, and there's...
Infanta asked 28/7, 2011 at 13:51
1
Solved
I need to get Json data from a C# web service.
I know there are several questions based on this, trust me I have read through quite a few but only to confuse me further.
This is what I have done...
Whithersoever asked 6/12, 2011 at 19:15
2
Solved
I have some JSON that I need to deserialize so I'm using JavaScriptSerializer.DeserializeObject like:
var jsonObject = serializer.DeserializeObject(line) as Dictionary<string, object>;
The...
Polygyny asked 2/12, 2011 at 0:8
2
Solved
I have a js object structured like:
object.property1 = "some string";
object.property2 = "some string";
object.property3.property1 = "some string";
object.property3.property2 = "some string";
obje...
Ditmore asked 2/6, 2010 at 16:27
© 2022 - 2024 — McMap. All rights reserved.