Added support for XML encoding

Golang's XML encoder doesn't work with maps, so more work is required
Replaced my PI constant with Golang constant
Changed how maps are serialized to JSON for the API.

Based on recommendation by @tkurki