I have a JSON string that I want to cut and put values into correct class. How do I do that in C#?
{
\"First\":{\"FirstBool\":1, \"aString\":\"hello\"},
\"Second\":{\"AnotherBool\":0,\"aString\":\"Hi again\"},
\"Third\":{\"ThirdBool\":0,\"aString\":\"Hi for the 3rd time\", \"AdditionalString\":\"ADDITIONAL STRING\"}
}
This is how I've set up my class for taking JSON values.
public class First{
public static bool FirstBool {get; set;}
public static string aString {get; set;}
}
public class Second{
public static bool AnotherBool {get; set;}
public static string aString {get; set;}
}
public class Third{
public static bool ThirdBool {get; set;}
public static string aString {get; set;}
public static string AdditionalString {get; set;}
}