Improving JSON export of object