Basic example of JSON encoding