Standardized toJSON, fromJSON, toString and fromString interfaces

It's an array, not a string.