added Optional.getOrElse
use type inference for json examples