Re: Deserializing JSON as an abstract type

2019-11-18 Thread Heromyth via Digitalmars-d-learn
On Tuesday, 19 November 2019 at 00:40:16 UTC, Chris wrote: So I'm trying to make a D wrapper for Telegram's JSON API using libtdjson. All results coming from the JSON API take the following structure: { "@type": "className", "foo": "bar", "baz" { "@type": "otherClass" } } where

Deserializing JSON as an abstract type

2019-11-18 Thread Chris via Digitalmars-d-learn
So I'm trying to make a D wrapper for Telegram's JSON API using libtdjson. All results coming from the JSON API take the following structure: { "@type": "className", "foo": "bar", "baz" { "@type": "otherClass" } } where every object, including nested ones, has a "@type" field