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

Parse JSON into org.embulk.spi.json.JsonValue, not org.msgpack.value.Value #8

Merged
merged 5 commits into from
Sep 25, 2023

Conversation

dmikurube
Copy link
Member

@dmikurube dmikurube commented Sep 21, 2023

As commented in embulk-util-json, we are going to release embulk-parser-json:0.11.1 just with dropping use of org.msgpack.value.Value, but without one-path parsing.

This pull request includes :

  • Replacing use of the old JsonParser to new JsonValueParser, with replacing use of org.msgpack.value.Value to org.embulk.spi.json.JsonValue
  • Testing it with org.embulk.spi.json.JsonValue, without org.msgpack.value.Value
  • Removing unnecessary dependencies

Each step is tested as an independent commit on CI.

embulk-parser-json:0.11.1 would be released with this, and also Embulk v0.11.1.

@dmikurube dmikurube added this to the v0.11.1 milestone Sep 21, 2023
@dmikurube dmikurube marked this pull request as ready for review September 21, 2023 05:25
@dmikurube dmikurube requested a review from a team as a code owner September 21, 2023 05:25
Copy link
Member

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

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

LGTM👍 (Please check the one comment)

if (task.getFlattenJsonArray()) {
if (!value.isArrayValue()) {
if (!value.isJsonArray()) {
throw new JsonRecordValidateException(
String.format(
"A Json record must represent array value with '__experimental__flatten_json_array' option, but it's %s",
Copy link
Member

Choose a reason for hiding this comment

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

Offtopic: __experimental__flatten_json_array -> flatten_json_array

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your good catch! Exactly. Fixed it in: b8039b4

@dmikurube
Copy link
Member Author

Thanks!

@dmikurube dmikurube merged commit 07e1e93 into main Sep 25, 2023
4 checks passed
@dmikurube dmikurube deleted the parse-to-JsonValue branch September 25, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants