Added type attribute to JSON