Skip to content

case_sparql_select: Update JSON index and orient parameter combinations #132

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

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:[email protected]"},{"?name":"Peter Goodguy","?mbox":"mailto:[email protected]"}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[["Johnny Lee Outlaw","mailto:[email protected]"],["Peter Goodguy","mailto:[email protected]"]]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:[email protected]"},{"?name":"Peter Goodguy","?mbox":"mailto:[email protected]"}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[["Johnny Lee Outlaw","mailto:[email protected]"],["Peter Goodguy","mailto:[email protected]"]]
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,22 @@ def make_data_frame_to_json_table_text_parameters() -> (
"values",
]:
# Handle incompatible parameter pairings for JSON mode.
if use_index is False:
if json_orient not in {"split", "table"}:
if use_index is True:
if json_orient not in {
"columns",
"index",
"split",
"table",
}:
continue
elif use_index is False:
if json_orient not in {
"records",
"split",
"table",
"values",
}:
continue

yield (json_orient, output_mode, use_header, use_index)
else:
yield ("columns", output_mode, use_header, use_index)
Expand Down