proximax-storage / cpp-xpx-chain-sdk

ProximaX Sirius-Chain C++ SDK
Apache License 2.0
2 stars 1 forks source link

HTTP & WebSockets request senders. #7

Closed eugene-babichenko closed 5 years ago

eugene-babichenko commented 5 years ago

@pananton13 Thanks for the explanation/suggestion.

The guide for using those classes as well as the documentation for them is really missing. Can you take a little time for adding them right into the library? That would be really helpful for further development, because the serialization code looks a bit complicated.

pananton commented 5 years ago

I'll try to do this soon. Currently it has a comment about what types are supported for VariadicStruct fields to be used in serialization in json/Parser.h . To have more idea about how it is used look into already implemented binary transaction DTOs in infrastructure/binary/dto/transaction_dto.h - binary serialization is build on same principles. In general, you describe structure of your json object in terms of VariadicStruct (which is similar to C++ struct, but each field also contains a descriptor, which can hold additional information about it (like whether field is optional in json or not)) and json::Parser can read/write any properly described struct.

pananton commented 5 years ago

@vulfke482 Oops, looks like you've accidently pushed all build artifacts to repo. They should be removed before your branch get merged to develop. Note, that if you simple remove files from your local copy and then push - it will not solve the problem, because binary files will stay in repo history, increasing the size of repo. Look for instructions on git filter-branch command here: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History .