This project has moved. For the latest updates, please go here.

CultureInfo into Value-method

Feb 18, 2011 at 5:14 PM

First of all I have to say that I really like your library to parse Json. I am working with this library a lot. Now after a while I found some spots where the library could be improved.


1)    Parsing to numbers

        private void AddPointToPath(JToken token, List<JsonPoint> newPath)


            JsonPoint point = new JsonPoint();

            string x = token.First.Value<string>();

            string y = token.Last.Value<string>();

            point.X = double.Parse(x, CultureInfo.InvariantCulture);

            point.Y = double.Parse(y, CultureInfo.InvariantCulture);



       As you can see I have to parse the value first to a string so I can parse the value to double with a CultureInfo.

       It would be nice if you can put a CultureInfo into the “Value”-method.