Hi everyone!
I'm working with an API-Rest that generates me a JSON with a polygon (every coordinates of that polygon, shape).
Well, I deserialize it in classes, but the coordinates deserialize in string (I mean, x and y coordinates as string) so I can't use it, because I need to put each point with lat and with long.
How can I deserialize it in a double or float to use my coordinates?
That is the JSON: shape\":[\"52.5139618,13.3210087\",\"52.5139618,13.3222961\",\"52.5141335,13.3228111\",\"52.5144768,13.3231544\",\"52.5146484,13.3236694\",\"52.5146484,13.3243561\",\"52.5144768,13.3248711\",\"52.5141335,13.3252144\",
And that is my class:
public class Component
{
public int id { get; set; }
public string[] shape { get; set; }
}
Thank you in advance