title: Boost ptree array of numbers
body: <p>I use the following code to create an array of the numbers.</p>
  
  <p>After running the following code, I reveive the following results:</p>
  
  <pre><code>{
      "": "1.100000",
      "": "2.200000",
      "": "3.300000"
  }
  </code></pre>
  
  <p>It is good except for my desired result has to be an array of numbers not string. Adding a number directly by <code>boost::property_tree::ptree(x)</code> gives me an error too. How can I produce my output json results?</p>
  
  <pre><code>{
      "": 1.100000,
      "": 2.200000,
      "": 3.300000
  }
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/property_tree/ptree.hpp&gt;
  #include &lt;boost/property_tree/json_parser.hpp&gt;
  
  int main()
  {
      boost::property_tree::ptree pt;
      std::vector&lt;double&gt; Vec={1.1,2.2,3.3};
      for(double x:Vec)
      {
          std::string x_string=std::to_string(x);
          pt.push_back(
              std::make_pair("", 
              boost::property_tree::ptree(x_string)) );
  
      }
      boost::property_tree::json_parser::write_json(std::cout, pt);
      std::cout&lt;&lt;std::endl;
      return 0;
  }
  </code></pre>