Fully implemented creating JSON object