converting std::chrono::system_clock::time_point to json. #2159
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
What do you want to achieve?
I was trying to convert time variable of my custom class which is std::chrono::system_clock::time_point type, to a json.
I am able to convert other class variable which are strings. The class outline looks like this:
SensorData(std::chrono::system_clock::time_point t, const std::string& topic, const std::string& frame_id)
After going through the README, I believe converting third party type is the relevant section for me. I have scratched the surface a bit, but yet to go deeper.
I have two questions:
i. Could you confirm whether this is the right section to look for regarding the mentioned use case.
ii. Are there examples available here which does a similar task?
Please let me know if something is not clear here.
Thanks.
What have you tried?
I have tried creating object as mentioned in README following a key-value pair pattern.
Can you provide a small code example?
Which compiler and operating system are you using?
Target: x86_64-apple-darwin18.7.0
Thread model: posix
Which version of the library did you use?
develop
branchThe text was updated successfully, but these errors were encountered: