Add utils to support builder pattern for creating JSON objects.

Update example Java apps to show how the builder can be used.