#660 - Fixed the right json stucture for type attribute.