Properly return id.toHash
Converted to!JSONValue to toJSON for tags

Fixes compile errors in 2.0.66 and is more consistent with other toJSONs