More complex example for json writes