Hi,
I need help to parse below json n create a dynamic dictionary manually instead of Javascriptserializer class as this doesn't work in .net core.
Sample json:
const string json =
"{" +
" \"firstName\": \"John\"," +
" \"lastName\" : \"Smith\"," +
" \"age\" : 25," +
" \"address\" :" +
" {" +
" \"streetAddress\": \"21 2nd Street\"," +
" \"city\" : \"New York\"," +
" \"state\" : \"NY\"," +
" \"postalCode\" : \"11229\"" +
" }," +
" \"phoneNumber\":" +
" [" +
" {" +
" \"type\" : \"home\"," +
" \"number\": \"212 555-1234\"" +
" }," +
" {" +
" \"type\" : \"fax\"," +
" \"number\": \"646 555-4567\"" +
" }" +
" ]" +
" }";
What I have tried:
Sample json:
const string json =
"{" +
" \"firstName\": \"John\"," +
" \"lastName\" : \"Smith\"," +
" \"age\" : 25," +
" \"address\" :" +
" {" +
" \"streetAddress\": \"21 2nd Street\"," +
" \"city\" : \"New York\"," +
" \"state\" : \"NY\"," +
" \"postalCode\" : \"11229\"" +
" }," +
" \"phoneNumber\":" +
" [" +
" {" +
" \"type\" : \"home\"," +
" \"number\": \"212 555-1234\"" +
" }," +
" {" +
" \"type\" : \"fax\"," +
" \"number\": \"646 555-4567\"" +
" }" +
" ]" +
" }";