Creates a failed result holding the given error message.
Parses a typed result from a JSON response returned by the native layer.
Parses a simple success-or-error JSON response that carries no value.
Creates a successful result holding the given value.