You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
Call to odata_message_writer::write_service_document() use odata_json_writer::serialize() to produce a JSON service document. Inside this document, the URLs elements are labelled "uri" (see bellow)
"Each element MUST be a JSON object with at least two name/value pairs, one with name name containing the name of the entity set, function import, or singleton, and one with name url containing the URL of the entity set, which may be an absolute or a relative URL. It MAY contain a name/value pair with name title containing a human-readable, language-dependent title for the object."
With following example:
One way to fix this would be to modify include/odata/core/odata_json_writer.h
and change the value of
#define JSON_URI U("uri")
to
#define JSON_URI U("url")
But maybe it should be confusing...
The other solution consist in creating
#define JSON_URL U("url")
in include/odata/core/odata_json_writer.h
and modify src/core/odat_json_writer.cpp to replace
result[JSON_URI] = odata::utility::json::value::string(service_document_element->get_url());
by
result[JSON_URL] = odata::utility::json::value::string(service_document_element->get_url());
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Call to odata_message_writer::write_service_document() use odata_json_writer::serialize() to produce a JSON service document. Inside this document, the URLs elements are labelled "uri" (see bellow)
{
"kind":"EntitySet",
"name":"Categories",
"uri":"Categories"
}
But as stated in the following document : http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.doc
"Each element MUST be a JSON object with at least two name/value pairs, one with name name containing the name of the entity set, function import, or singleton, and one with name url containing the URL of the entity set, which may be an absolute or a relative URL. It MAY contain a name/value pair with name title containing a human-readable, language-dependent title for the object."
With following example:
One way to fix this would be to modify include/odata/core/odata_json_writer.h
and change the value of
#define JSON_URI U("uri")
to
#define JSON_URI U("url")
But maybe it should be confusing...
The other solution consist in creating
#define JSON_URL U("url")
in include/odata/core/odata_json_writer.h
and modify src/core/odat_json_writer.cpp to replace
result[JSON_URI] = odata::utility::json::value::string(service_document_element->get_url());
by
result[JSON_URL] = odata::utility::json::value::string(service_document_element->get_url());
The text was updated successfully, but these errors were encountered: