We use a 3rd party REST web service which defines their json API using piqi schemas. Our current architecture needs this data to be read through a java client and transferred to a c++ binary. Ideally, I would like all of the POJOs and c++ structs, as well as the data translation (json->java, java->c++) logic to be generated. I've been investigating different combinations of protobuf, protostuff, and thrift, but there are still gaps in the flow. Anyone have suggestions?
How can I read JSON data from C++ through Java using a piqi definition
631 Views Asked by Ajay At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in PROTOCOL-BUFFERS
- Elephant bird with hive to query protobuf file
- What are the possible bugs that cause slow response (sometimes but not all the time) for a websocket connection?
- Error: 2 overloads have no legal conversion for this pointer, when protocol buffer method is invoked
- php extension not loading in MAMP
- why use protocol buffers in java
- Boost asio TCP + google proto
- Riak - Connection Refused while trying to connect to Riak cluster using Python client library
- How to generate swift files for protobuf
- Unable to detect version control system for go protobuf
- how to know if a WCF service uses protobuf-net?
- Problems using Protocol Buffers to read messages from file
- Sending protobuf from C++ to Java
- PHP Fatal error: Class 'ProtocolBuffers\Message' not found in
- Using protobuf with golang and handling []byte HTTP response body
- Java socket data works only when sending time is delayed
Related Questions in THRIFT
- Pycharm can't find Thrift ttypes file
- Jcascalog to query thrift data on HDFS
- Ruby Thrift::TransportException End of File Reached
- JRuby/Gem logging "Ignoring thrift-0.9.0 because its extensions are not built"
- Thrift error in Python -> Hive connection
- Java NoSuchMethodError when connecting via JDBC to Hive
- Symmetric encryption (AES) in Apache Thrift
- Apache Thrift Javascript client to C++ Server
- How to represent java object as return type of service in .thrift file
- difference between happybase table.scan() and hbase thrift scannerGetList()
- How to use Thrift Scala classes generated by Scrooge?
- How to set Hive configuration property hive.exec.dynamic.partition from Java code
- Why does qmake fail to rm files correctly during rebuild with a custom compiler?
- Thrift in python, client of simple example can not connect to local host on Ubuntu 14.04 LTS
- gevent, ways of triggering the newly-spawn tasks to run
Related Questions in PROTOSTUFF
- How to get protobuf-net and protostuff to mutually support inherited classes in .Net and Java?
- Why does protostuff corrupt objects when using generics combined with circular references?
- How to build akka-protostuff-serialization?
- how to define in java class to matches the proto blank field definition?
- Protostuff serialized bytecode on Android cannot be deserialized on PC
- Problem with Import object_detection/protos/image_resizer.proto but not used protobuf compilation in OS High Sierra
- Backward Compatibility when adding a field in response of an API
- How to fix "import com.dyuproject cannot be resolved" error
- Deserializing arrays with protostuff
- How to add field into class with deserialization compatibility using Protostuff?
- Protostuff serialize object like Map<String, Map<String, String>>
- How can I read JSON data from C++ through Java using a piqi definition
- what is the most efficient way to serialize primitive type array by protostuff
- How do you serialize Guava's immutable collections using Protostuff?
- RuntimeSchema in Protostuff cyclic references?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Piqi author here. Most likely the third-party API provider exposes the JSON over HTTP API using piqi-rpc. Assuming you have the up-to-date
.piqidefinitions of the service there's a chance you can get output and/or send input data in Protocol Buffers format instead of JSON. Dealing with Protobuf in both Java and C++ is a lot easier and more reliable than dealing with JSON.Unless the API provider explicitly disables use of Protocol Buffers as input/output format, you should be able to use this format by setting
Acceptheader (andContent-Typefor input parameters) toapplication/x-protobufas described here. I would just try that and see if it works. If it doesn't you can ask the provider to turn it on.