Skip to content

Deserialize dynamic format issue #82

@dhutapratama

Description

@dhutapratama

Hello,

I was try to deserialize json data to dynamic format by wiki documentation but always fail.
and then i have an idea to change the format back to JsonObject and working.

Your Wiki Reference
Deserialize JSON String
Using dynamic

dynamic json = SimpleJson.DeserializeObject(data);
string firstName = json.first_name;
DateTime startDate = json.startDate
int voteCount = json.voteCount
List results = json.results;

My right way
Deserialize JSON String
Using dynamic

dynamic json = SimpleJson.DeserializeObject(data);
string firstName = json["first_name"];
DateTime startDate = json["startDate"];
int voteCount = json["voteCount"];
List results = json["results"];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions