Hacker News new | ask | show | jobs
by dom96 3406 days ago
Because the type of a JSON object's fields is not known at compile-time.

    let s = parseJson("{'A': 'foo'}")
    s["A"] # What type is this? We don't know until we parse the JSON.