optimized JSON de/serialization
fixed documentation