Pavel Shorokhov
03/21/2019, 11:46 PMJSON.parse<T>()
won't fails with incorrect json and will continue works.
For example:
data class Car(val name: String)
val car = JSON.parse<Car>("{\"qwe\":123}")
This code will works and car.name
will return undefined.
Is there any way to check that json matches to specified structure?Pavel Shorokhov
03/21/2019, 11:47 PMcar is Car
always return false
(for correct and incorrect jsons both).