Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:40:02+00:00 2026-06-15T09:40:02+00:00

I have a sample json record that I have parsed via boost json parser

  • 0

I have a sample json record that I have parsed via boost json parser and saved it to boost property tree to get all key value pairs.ia following code I am able to get first attribute of tree but how can I get second attributes value ? when I try to get it ,it shows me exception that “No such node”.

if I iterate the tree ,then it is showing me all keys.I don’t understand whats wrong with it.
ref : http://www.boost.org/doc/libs/1_52_0/doc/html/boost_propertytree/accessing.html

json string := {"type":"net.aggregate","post.source":"1209010340", "val":1000}

Code:

boost::property_tree::ptree pt;    
read_json("jSon string object", pt);
cout << pt.get("type", ""); // working
cout <<  pt.get("post.source", "") // showing error ....`
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:40:03+00:00Added an answer on June 15, 2026 at 9:40 am

    Because Boost property_tree uses the dot to separate different objects. When you request "post.source" the get function looks for an object post with a property source.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Sharepoint list which I want to convert to a JSON via
I have a simple rails webservice that exposes a JSON API that allows clients
below is the json sample i have imported to solr where id is unique
I have a simple json string which contains a collection of objects http://sandapps.com/InAppAds/ads.json.txt When
am just starting off with restkit for ios. I have a very simple json
I used to have this kind of simple JSON data and I could successfully
I have a 'simple' scenario: Read some JSON file, Filter or change some of
I have a simple scenario where i want to output only json to the
I am using json-simple . If I have a JSON like: [ {id:1,name:...,description:...,dtStart:2012-03-27 03:00:00,dtEnd:2012-03-28
I have the following simple jquery snippet $(document).ready(function () { $.ajax({ url:myjson.json, dataType: 'json',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.