fixed typos in comments for examples
This commit is contained in:
		
							parent
							
								
									0a81353989
								
							
						
					
					
						commit
						260745810d
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -4,7 +4,7 @@ using namespace nlohmann;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main()
 | 
					int main()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // create a JSON boolean
 | 
					    // create a JSON number
 | 
				
			||||||
    json value = 17;
 | 
					    json value = 17;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // explicitly getting pointers
 | 
					    // explicitly getting pointers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@ using namespace nlohmann;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main()
 | 
					int main()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // create a JSON boolean
 | 
					    // create a JSON number
 | 
				
			||||||
    json value = 17;
 | 
					    json value = 17;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // explicitly getting pointers
 | 
					    // explicitly getting pointers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,13 +4,13 @@ using namespace nlohmann;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main()
 | 
					int main()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // create JSON arrays
 | 
					    // create JSON objects
 | 
				
			||||||
    json j_no_init_list = json::object();
 | 
					    json j_no_init_list = json::object();
 | 
				
			||||||
    json j_empty_init_list = json::object({});
 | 
					    json j_empty_init_list = json::object({});
 | 
				
			||||||
    json j_list_of_pairs = json::object({ {"one", 1}, {"two", 2} });
 | 
					    json j_list_of_pairs = json::object({ {"one", 1}, {"two", 2} });
 | 
				
			||||||
    //json j_invalid_list = json::object({ "one", 1 }); // would throw
 | 
					    //json j_invalid_list = json::object({ "one", 1 }); // would throw
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // serialize the JSON arrays
 | 
					    // serialize the JSON objects
 | 
				
			||||||
    std::cout << j_no_init_list << '\n';
 | 
					    std::cout << j_no_init_list << '\n';
 | 
				
			||||||
    std::cout << j_empty_init_list << '\n';
 | 
					    std::cout << j_empty_init_list << '\n';
 | 
				
			||||||
    std::cout << j_list_of_pairs << '\n';
 | 
					    std::cout << j_list_of_pairs << '\n';
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue