Update JSON API, add implementation
Added example code that tests an optional element for nullness