Shorter object serialization for JavaScript