[Solved] Invalid value type: String for Integer

Remove the quotes from around the numbers like this: Map<String, Integer> temp = new Map<String, Integer>{‘type’ => 123, ‘count’ => 1}; EDIT: As you changed your question completely, the best way of achieving this would be: public List<Map<String,String>> getPhoneData() { List<Map<String, String>> mapp = new List<Map<String, String>>(); Map<String, String> temp = new Map<String, String>{‘type’ => … Read more

[Solved] How to Assign NULL to XS:date XML Format

If you control the XSD, you might redefine type field from being strictly xs:date to being <xs:simpleType name=”dateOrEmpty”> <xs:list itemType=”xs:date” maxLength=”1″/> </xs:simpleType> as answered by Michael Kay in a question regarding how to allow an XSD date to be an empty string. solved How to Assign NULL to XS:date XML Format