Added a json encoder for properties