Ensuring sub-resource value is correctly encoded for signing