Json API fixes

- didn't correctly generate the URL in @id attributes
- empty contact names would result in badly formatted phone numbers