Questions tagged [boost-propertytree]

The Boost PropertyTree library provides a data structure that stores an arbitrarily deeply nested tree of values, indexed at each level by some key. It serializes and emulates XML, JSON and INI file structures.

The Boost PropertyTree library provides a data structure that stores an arbitrarily deeply nested tree of values, indexed at each level by some key. It serializes and emulates XML, JSON and INI file structures.

Note: Boost.PropertyTree is not a generic XML parser. It is not intended to be used as a fast-and-dirty way to load arbitrary XML files into memory. It's XML serialization capabilities are for serialization. It is intended to read the XML that it has written.

Please stop using Boost.PropertyTree as a generic XML parser.

354 questions
0
votes
1 answer

Primefaces p:teee horizontal not working and rendering correctly

I am doing a very basic example from primefaces showcase Primefaces Version = V-6.0.18 WAS 9 https://www.primefaces.org/showcase/ui/data/htree/basic.xhtml There is no difference in code and I see bean being called . I also see in chrome developer…
bhakav
  • 33
  • 5
0
votes
2 answers

Generic enum translator for boost::property_tree

I'm loading/saving a set of parameters from/to a file using boost::property_tree. Many of those parameters are enumerations (different types). So I need a way to get enums from a boost::property_tree (i.e., converting a string to enum), and…
cbuchart
  • 10,847
  • 9
  • 53
  • 93
0
votes
1 answer

boost::property_tree put usage C++

I am doing a ptree.put() inside a class member function. class Writer{ private: boost::property_tree::ptree ptree_; public: Writer(){} void setData1(string path, string data){ ptree_.put(path, data); } void…
Teshan Shanuka J
  • 1,448
  • 2
  • 17
  • 31
0
votes
3 answers

Unable to display data in PrimeNG Treenode Component

I am trying to display data in Treenode format in angular 5 project. I am getting the data from service which is in the below form (in object form): { "data": [ { "label": "Documents", "data": "Documents Folder", …
0
votes
1 answer

casting a string to a GUID does not give right result

In my program, I need to read a guid value stored in a xml file. Here is how xml file looks like. 3AAAAAAA-BBBB-CCCC-DDDD-2EEEEEEEEEEE My program needs to read this value in a GUID type variable. Below is what I have for…
whoami
  • 1,689
  • 3
  • 22
  • 45
0
votes
0 answers

C++ processing array of anonymous JSON data

I have the following array of anonymous JSON data and used boost property tree to read the data. I am able to read the data and wondering if there is any better to parse the data using boost property tree. Here is the data set [{"id":…
Jolly Jose
  • 84
  • 5
0
votes
1 answer

How to RESET attribute of xml element using boost::property_tree?

I have a xml file, I need to modify few attributes in that file. My xml file is something like below:
0
votes
1 answer

Check if an element does exists in xml file with boost property tree

I am parsing an XML file using boost property tree of the following type:
sbunny
  • 433
  • 6
  • 25
0
votes
1 answer

Boost info parser removes all the comments while reading/writing an INFO format file

Say, we have a file named a.conf key3 { key4 "value4 with spaces" ;this is a key4 } When I try to read an INFO formatted file having above content using the boost info parser in the following ways; namespace p = boost::property_tree; p::ptree…
0
votes
1 answer

boost::property_tree : Parsing of Complex xml strucure

I am want to parse below xml structure using boost property_tree.
Sandip Patidar
  • 157
  • 1
  • 14
0
votes
0 answers

Binary data serialization into JSON with the boost property_tree

I have an issue with serializing the binary data when the bytes are greater 127 (0x7f). It looks like an upper bit is cut out so I get 0x7f when I want to read 0xff. Example: using boost::property_tree::ptree; ptree pt; pt.put ("binary",…
0
votes
1 answer

C++: Beautify boost ptree json_parser

In the following code using C++ Boost property tree, I expect a beautiful output such as { "fruit": { "apple": "true", "orange": "true" }, "animal": { "cat": "true", "dog": "true", "bird": { "duck": "true" } …
ar2015
  • 5,558
  • 8
  • 53
  • 110
0
votes
2 answers

property_tree: cannot set a default property value?

The code below reads a property from an ini file. However, I want the property to have a default value. I do this with put, before reading the ini file, and then retrieving the property with get. This works fine if the default isn't required, and…
EML
  • 9,619
  • 6
  • 46
  • 78
0
votes
1 answer

Select a sub node tag regardless the position using boost::property_tree

Let's say I have two XMLs:
foo
foo Is there a way to extract my_value…
Alessandro Teruzzi
  • 3,918
  • 1
  • 27
  • 41