Compact json serialization for efficiency