Boost.org property_tree module

Overview

Maintainer

This library is currently maintained by Richard Hodges with generous support from the C++ Alliance.

Build Status

Branch Status
develop CI
master CI

Licence

This software is distributed under the Boost Software License, Version 1.0.

Original Work

This library is the work of Marcin Kalicinski and Sebastian Redl

Copyright (C) 2002-2006 Marcin Kalicinski
Copyright (C) 2009 Sebastian Redl

Comments
  • This seems to be a bug

    This seems to be a bug

    parse xml file:

    c++ code:

    std::locale utf8Locale(std::locale(), new std::codecvt_utf8<wchar_t>());
    std::wifstream f(*path);
    f.imbue(utf8Locale);
    wptree tree;
    read_xml(f, tree);
    

    xml file content:

    <?xml version="1.0" encoding="UTF-8"?>
    <data>
    <content>你好&#128549;</content>
    </data>
    

    result is: "你好😥" image

    other info: boost property tree v 1.68.0 VS 2017 15.9.4 Windows 10 17763.195

    opened by HppZ 8
  • JSON Parser: Missing Bind Placeholders

    JSON Parser: Missing Bind Placeholders

    Fixes missing placeholder includes to boost::bind.

    boost/property_tree/json_parser/detail/parser.hpp(217): error: identifier "_1" is undefined
    boost/property_tree/json_parser/detail/parser.hpp(520): error: identifier "_1" is undefined
    

    Reported in https://svn.boost.org/trac/boost/ticket/12841

    opened by ax3l 8
  • handle xml writing of null keys

    handle xml writing of null keys

    boost::property_tree can have nulls as keys. In particular, json read typically generates child nodes with null keys as part of array processing. Place a nonce (3cb6534e-d358-4705-9e74-fee06453661e) as a unique tag name for null keys in write_xml.

    opened by brchrisman 6
  • Deprecation warning with boost 1.73.0 in json_parser/detail/parser.hpp

    Deprecation warning with boost 1.73.0 in json_parser/detail/parser.hpp

    json_parser/detail/parser.hpp includes <boost/bind.hpp> which causes a deprecation warning with boost 1.73.0.

    ..\boost\boost/bind.hpp(41): note: The practice of declaring the Bind placeholders (_1, _2, ...)
    in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using
    namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to
    retain the current behavior.
    

    This could for example be resolved by using #include <boost/bind/bind.hpp> and adding a using namespace boost::placeholders in the methods that use boost::bind with _1, etc.

    opened by rogerorr 5
  • Fix different signedness comparison on Arm

    Fix different signedness comparison on Arm

    wchar_t is an unsigned on Arm, therefore a promotion is necessary here to correctly perform the comparison

    More information about Armv8 types on https://developer.arm.com/documentation/den0024/a/Porting-to-A64/Data-types

    opened by aladram 2
  • How to parse nested level of arrays in a json using boosts property tree?

    How to parse nested level of arrays in a json using boosts property tree?

    Hi, I want to parse below JSON data and get the "netconf-clients" available. Can someone help me on how to do it.

    ('{"o-ran-dhcp:dhcp": {"interfaces": [{"interface": "mPlaneVlan295", "dhcpv4": ' '{"client-id": "53148/473966A.101/L1174115125", "dhcp-server-identifier": ''"192.168.100.1", "interface-mtu": 1500, "domain-name": "nokia.com", ' '"domain-name-servers": ["192.168.1.1", "192.168.1.2"], "default-gateways": ''["192.168.100.1"], **"netconf-clients": [{"client": "192.168.100.1", ''"optional-port": 4334}, {"client": "xyz.com", "optional-port": 4334}], '** '"ca-ra-servers": [{"servers": "192.168.100.1", "port-number": 99, ' '"ca-ra-path": "var/opt/z", "subject-name": "radio", "protocol": "HTTPS"}], ' '"segw": [{"gateways": "1.2.3.4"}], "local-ip": "192.168.100.3"}, "dhcpv6": ''{}}], "m-plane-dhcp": {"private-enterprise-num": 53148, "vendor-class-data": ' '"o-ran/No125"}}}')

    Br, Neeraj

    opened by Neeraj0019 2
  • GCC suggest-override warning

    GCC suggest-override warning

    Warning when Boost 1.72 is built with GCC 7.5 with -Wsuggest-override added to cxxflags:

    ./boost/property_tree/detail/rapidxml.hpp:61:29: warning: ‘virtual const char* boost::property_tree::detail::rapidxml::parse_error::what() const’ can be marked override [-Wsuggest-override]
    

    BOOST_OVERRIDE was introduced in https://github.com/boostorg/config/commit/ffe4e0f5a448578cce14e3eed0cf7163333a81d9.

    opened by EugeneZelenko 2
  • Proof-of-concept `splice` operation

    Proof-of-concept `splice` operation

    It's currently not possible to efficiently move nodes between ptrees.

    Context/discussion: https://stackoverflow.com/a/29563086/85371

    This PR is a DRAFT. It is meant to sollicit interest and quick review (is the idea "sane"? I do not believe any invariants are at risk, but maybe the core maintainers see more).

    If there's interest, I'll flesh it out in full.


    Multi Index splice overloads: http://www.boost.org/doc/libs/release/libs/multi_index/doc/reference/seq_indices.html#list_operations

    reviewer suggestion: Joaquín M López Muñoz

    opened by sehe 2
  • Update xml_parser.qbk

    Update xml_parser.qbk

    Though correct, the documentation is misleading about the name of the "<xmlattr>" tag, because most readers will assume that the "<" and ">" are there to denote that it's a tag and the actual name is "xmlattr" only. Save hundreds of programmers an hour of debugging by making it clear.

    opened by Megatokio 1
  • Update CMakeLists.txt, test/CMakeLists.txt

    Update CMakeLists.txt, test/CMakeLists.txt

    In the root CML, this moves the options/folders outside the BOOST_SUPERPROJECT_VERSION case. In tests/CML, it attaches the tests to the tests target, which will be the Boost-wide convention for building the test executables. They are still left attached to the all target as well, because I didn't know if that was relied upon. If not, the test executables should use EXCLUDE_FROM_ALL.

    opened by pdimov 1
  • Create CMakeLists.txt

    Create CMakeLists.txt

    I created CMakeLists.txt on the root, test, and examples directories to make this library managed by CMake.

    Installation

    $ mkdir build && cd build
    build/$ cmake ..
    build/$ make
    build/$ make install
    

    Running Tests

    $ mkdir build && cd build
    build/$ cmake .. -DBUILD_TESTING=ON
    build/$ make
    build/$ make test
    

    Running Examples

    $ mkdir build && cd build
    build/$ cmake .. -DBUILD_EXAMPLES=ON
    build/$ make
    build/$ make example-${EXAMPLE_NAME}
    
    opened by ken-matsui 1
  • need support for custom allocator

    need support for custom allocator

    multi_index_container provide typename Allocator, but basic_ptree doesn't provide it. How i can use custom allocator for basic_ptree?

    I already use custom allocator for key and values.

    opened by Batodalaev 1
  • Fix build when `BOOST_BIND_NO_PLACEHOLDERS` is defined

    Fix build when `BOOST_BIND_NO_PLACEHOLDERS` is defined

    <boost/bind/placeholders.hpp> should be explicitly included here, because <boost/bind/bind.hpp> may not include it depending on whether BOOST_BIND_NO_PLACEHOLDERS is defined or not.

    opened by Osyotr 0
  • property_tree/ptree_serialization.hpp does not include boost/archive/basic_archive.hpp

    property_tree/ptree_serialization.hpp does not include boost/archive/basic_archive.hpp

    Here's the second clang-modules issue I found (with this and #99 addressed, I could build ptree_serialization as a submodule).

    It refers to some archive/basic_archive details.

    ''' -- a/1.77.0/src/boost_1_77_0/boost/property_tree/ptree_serialization.hpp +++ b/1.77.0/src/boost_1_77_0/boost/property_tree/ptree_serialization.hpp @@ -10,8 +10,8 @@ #ifndef BOOST_PROPERTY_TREE_PTREE_SERIALIZATION_HPP_INCLUDED #define BOOST_PROPERTY_TREE_PTREE_SERIALIZATION_HPP_INCLUDED

    +#include <boost/archive/basic_archive.hpp> #include <boost/property_tree/ptree.hpp>

    #include <boost/serialization/nvp.hpp> #include <boost/serialization/collections_save_imp.hpp> #include <boost/serialization/detail/stack_constructor.hpp> '''

    opened by urnathan 0
  • property_tree/detail/file_parser_error.hpp does not #include <sstream>

    property_tree/detail/file_parser_error.hpp does not #include

    This was discovered when enabling clang implicit modules (and by implication will affect C++20 header-units). property_tree/detail/file_parser_error.hpp uses stringstream without #including , and therefore is not self contained. Fixed thusly:

    --- c/1.77.0/src/boost_1_77_0/boost/property_tree/detail/file_parser_error.hpp
    +++ w/1.77.0/src/boost_1_77_0/boost/property_tree/detail/file_parser_error.hpp
    @@ -12,6 +12,7 @@
     
     #include <boost/property_tree/ptree.hpp>
     #include <string>
    +#include <sstream>
     
     namespace boost { namespace property_tree
     {
    
    opened by urnathan 1
  • Improve robustness of INI parser by refusing NULL characters

    Improve robustness of INI parser by refusing NULL characters

    We are facing a weird issue on Windows, where a file move operation is not atomic: It seems to copy the file and sometimes it produces files that start normally, but then end filled with NULL characters. It looks as if a buffer was prepared, possibly memory mapped and then never filled.

    Unfortunately the property_tree ini parser parses such files in many cases. Would it be possible to throw an exception on NULL characters, possibly as an option? Other characters below ASCII 32 excluding CR, LF, TAB may possibly be refused as well.

    opened by bubnikv 0
Owner
Boost.org
Boost provides free peer-reviewed portable C++ source libraries.
Boost.org
Boost.GIL - Generic Image Library | Requires C++11 since Boost 1.68

Documentation GitHub Actions AppVeyor Azure Pipelines CircleCI Regression Codecov Boost.GIL Introduction Documentation Requirements Branches Community

Boost.org 154 Nov 24, 2022
canonical libwebsockets.org networking library

Libwebsockets Libwebsockets is a simple-to-use, MIT-license, pure C library providing client and server for http/1, http/2, websockets, MQTT and other

lws-team 3.7k Dec 31, 2022
Socket and Networking Library using msgpack.org[C++11]

netLink C++ 11 KISS principle networking library. Features: C++ 11 IPv4, IPv6 Protocols: TCP, UDP Enable/Disable blocking mode Join/Leave UDP-Multicas

Alexander Meißner 210 Oct 18, 2022
HTTP and WebSocket built on Boost.Asio in C++11

HTTP and WebSocket built on Boost.Asio in C++11 Branch Linux/OSX Windows Coverage Documentation Matrix master develop Contents Introduction Appearance

Boost.org 3.6k Jan 4, 2023
C++ peer to peer library, built on the top of boost

Breep What is Breep? Breep is a c++ bridged peer to peer library. What does that mean? It means that even though the network is constructed as a peer

Lucas Lazare 110 Nov 24, 2022
Asynchronous gRPC with Boost.Asio executors

asio-grpc This library provides an implementation of boost::asio::execution_context that dispatches work to a grpc::CompletionQueue. Making it possibl

Dennis 180 Dec 31, 2022
requests-like networking library using boost for C++

cq == C++ Requests cq == C++ Requests is a "Python Requests"-like C++ header-only library for sending HTTP requests. The library is inspired a lot by

null 11 Dec 15, 2021
Ole Christian Eidheim 741 Dec 27, 2022
Lightweight, header-only, Boost-based socket pool library

Stream-client This is a lightweight, header-only, Boost-based library providing client-side network primitives to easily organize and implement data t

Tinkoff.ru 12 Aug 5, 2022
Boost headers

About This repository contains a set of header files from Boost. Can be useful when using header only libraries. How to use You can easily include the

null 2 Oct 16, 2021
Packio - An asynchronous msgpack-RPC and JSON-RPC library built on top of Boost.Asio.

Header-only | JSON-RPC | msgpack-RPC | asio | coroutines This library requires C++17 and is designed as an extension to boost.asio. It will let you bu

Quentin Chateau 58 Dec 26, 2022
Boost::ASIO low-level redis client (connector)

bredis Boost::ASIO low-level redis client (connector), github gitee Features header only zero-copy (currently only for received replies from Redis) lo

Ivan Baidakou 142 Dec 8, 2022
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio.

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.

Ole Christian Eidheim 2.4k Dec 23, 2022
Super-project for modularized Boost

Boost C++ Libraries The Boost project provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work well with the C++ St

Boost.org 5.4k Jan 8, 2023
Minimalistic socket library inspired by Asio/Boost Asio, implemented in 1 single header file

cz-spas czspas (Small Portable Asynchronous Sockets) is minimalistic socket library inspired by Asio/Boost Asio, implemented in 1 single header file.

Rui Figueira 26 Nov 30, 2022
Level up your Beat Saber experience on Quest! AnyTweaks provides various tweaks to help boost your experience on Quest, such as Bloom, FPS Counter and more.

Need help/support? Ask in one of BSMG's support channels for Quest, or join my Discord server! AnyTweaks Level up your Beat Saber experience on Quest!

kaitlyn~ 19 Nov 20, 2022
libsinsp, libscap, the kernel module driver, and the eBPF driver sources

falcosecurity/libs As per the OSS Libraries Contribution Plan, this repository has been chosen to be the new home for libsinsp, libscap, the kernel mo

Falco 133 Dec 29, 2022
This is a kernel module for FreeBSD to support WireGuard

WireGuard for FreeBSD This is a kernel module for FreeBSD to support WireGuard. It is being developed here before its eventual submission to FreeBSD 1

WireGuard 38 Jan 4, 2023
A Nginx module which tries to implement proxy wasm ABI in Nginx.

Status This library is under construction. Description A Nginx module which tries to implement proxy wasm ABI in Nginx. Install dependencies Download

API7 104 Dec 29, 2022