Replies: 1 comment 1 reply
-
I have moved this question to the Discussions section as it's not a report of a bug or build issues. The vsg::text ReaderWriter doesn't attempt to parse the text files, it just reads them into a vsg::stringValue so that applications can do their own parsing on the files. Subclasses from ReaderWriter enables the files to be read from a variety of sources, including https/http when using vsgXchange. For very simply configuration files it's relatively easy to just use std::string/stringview methods to parse and extract required substrinsgs. However, for full xml or Json support you'll need to pass the read string onto the 3rd party library to parse it. Longer term I'd like the VSG to provide full Json and XML support, but I have a long list of tasks ahead of me before I can tackle them. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have a question about vsg::txt.
vsg::txt can read Json and XML files, but it can only obtain strings, which we feel is unwieldy.
Wouldn't it be easier to handle in a form like std::pair<std::string, vsg::Object>?
Or if there is already another way that is easier to handle, I would like to know.
thank you.
Beta Was this translation helpful? Give feedback.
All reactions