Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong length for IRemoteSchemaDocumentProvider #726

Closed
niukuo opened this issue Aug 31, 2016 · 0 comments
Closed

wrong length for IRemoteSchemaDocumentProvider #726

niukuo opened this issue Aug 31, 2016 · 0 comments

Comments

@niukuo
Copy link

niukuo commented Aug 31, 2016

#include <rapidjson/schema.h>
#include <rapidjson/document.h>
#include <string>
#include <iostream>

namespace rapidjson {

class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider {
public:
    virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeType length) {
        std::string str(uri, length);
        std::cout << str << std::endl;
        return NULL;
    }
};

}

int main()
{
    using namespace rapidjson;
    Document doc;
    SetValueByPointer(doc, "/$ref", "schema_prefix#/path");
    MyRemoteSchemaDocumentProvider provider;
    SchemaDocument schema(doc, &provider);
}

it outputs schema_prefi
but it should outputs schema_prefix

I have already created a pull request #723
hope to fix and release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants