Skip to content

JSON-LD Parser#426

Open
mcb5637 wants to merge 41 commits into
developfrom
feature/jsonld_parser
Open

JSON-LD Parser#426
mcb5637 wants to merge 41 commits into
developfrom
feature/jsonld_parser

Conversation

@mcb5637

@mcb5637 mcb5637 commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

close #424

@mcb5637
mcb5637 marked this pull request as ready for review April 22, 2026 15:06
@mcb5637
mcb5637 requested review from liss-h and nkaralis and removed request for liss-h April 22, 2026 15:06
@bigerl bigerl added the not pobr breaking change Not a breaking change for Persisted Object Binary Representation even if the workflow says so label Apr 23, 2026
@mcb5637 mcb5637 mentioned this pull request May 7, 2026

@nkaralis nkaralis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.
This is a first review focusing mostly on ParserTypes.

Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp Outdated
Comment thread tests/parser/tests_JSON_LD_Parser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp
Comment thread tests/parser/tests_JSON_LD_Parser.cpp
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.cpp
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.cpp
@mcb5637
mcb5637 requested a review from nkaralis May 19, 2026 12:27

@nkaralis nkaralis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second round of questions and comments.

Comment thread private/rdf4cpp/parser/JsonLdParserPath.hpp
Comment thread private/rdf4cpp/parser/JsonLdParserPath.hpp
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp
Comment thread private/rdf4cpp/parser/JsonLdParserTypes.hpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp
@mcb5637
mcb5637 requested a review from nkaralis May 21, 2026 12:58

@nkaralis nkaralis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments, mostly on ContextParser (parse_context_term is the only one left here).

// 3
if (parse_ctx != nullptr) {
auto i = parse_ctx->active_context.try_find_term(*value);
if (i != nullptr && i->parse_state != ParseState::Done && i != ignore_local) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which case is the parse state done in this case?

@mcb5637 mcb5637 Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done => the term was parsed successfully.
This happens if one term in a context refers to another term in the context and the refered to term was parsed first.
I added comments to the enum type to explain what they represent.

}
if (parse_ctx != nullptr) {
auto term = parse_ctx->active_context.try_find_term(pre);
if (term != nullptr && term->parse_state != ParseState::Done) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment thread private/rdf4cpp/parser/JsonLdContextParser.cpp
Comment thread private/rdf4cpp/parser/JsonLdExpandParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdContextParser.cpp
Comment thread private/rdf4cpp/parser/JsonLdContextParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdContextParser.cpp Outdated
Comment thread private/rdf4cpp/parser/JsonLdContextParser.cpp Outdated
}
for (auto v : a) {
switch (v.type()) {
case simdjson::ondemand::json_type::null: // 5.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate code (same code in the else if clause above). are both needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are needed, one is inside an array, the other in place of that array.

@mcb5637
mcb5637 requested a review from nkaralis June 10, 2026 13:28
@liss-h
liss-h force-pushed the feature/jsonld_parser branch from 0f29853 to af3fd4e Compare July 22, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not pobr breaking change Not a breaking change for Persisted Object Binary Representation even if the workflow says so

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Json-LD parser

4 participants