pub fn to_json<T>(value: &T) -> Result<Vec<u8>, JsonError>where T: Serialize,
Serialize value to JSON string (using dag-json).
value