This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library mirrors.src.decode; | |
import 'dart:mirrors' as mirrors; | |
import 'dart:convert'; | |
/// Create an object of the given type [t] from the given JSON string. | |
decode(String json, Type t) { | |
// Get deserialization descriptor for the given type. | |
// This descriptor describes how to handle the type and all its fields. | |
final TypeDesc desc = getDesc(t); |