Open dmikurube opened 7 years ago
Many plugins want to cast many values from type A to Type B. I hope embulk-core support those features. Ex) https://github.com/sonots/embulk-filter-typecast/blob/master/src/main/java/org/embulk/filter/typecast/JsonCaster.java
Currently many plugins copied those classes.
@hiroyuki-sato Thanks for your comments. Sure, we may want such conversion in the Embulk core. This issue #32 in embulk-base-restclient
is actually a different topic to discuss that, though.
Let's discuss that in github.com/embulk/embulk. :)
For this embulk-base-restclient
, we'd consider using https://github.com/msgpack/msgpack-java/tree/develop/msgpack-jackson or else like that. #51 is fixed tentatively by toString
in #52.
@dmikurube Thanks! I thought these features are useful for another plugin. :smile:
Prototyped jackson-datatype-msgpack on https://github.com/muga/jackson-datatype-msgpack. It might enable directly converting JsonNodes to/from MessagePack's Values. Next step is: Improve more and write tests. Then, Create PR for msgpack-java.
Values assumed to be JSON are converted to Embulk JSON by 1) converting to
String
, and then 2) parsing to Embulk JSON (msgpackValue
).We may want to make this more straightforward.