mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:40:06 +00:00 
			
		
		
		
	Refactor json utility to wxdata, add ReadJsonString function
This commit is contained in:
		
							parent
							
								
									895e760fee
								
							
						
					
					
						commit
						9f33189c18
					
				
					 12 changed files with 245 additions and 228 deletions
				
			
		
							
								
								
									
										15
									
								
								wxdata/include/scwx/util/json.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								wxdata/include/scwx/util/json.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <boost/json/value.hpp> | ||||
| 
 | ||||
| namespace scwx::util::json | ||||
| { | ||||
| 
 | ||||
| boost::json::value ReadJsonFile(const std::string& path); | ||||
| boost::json::value ReadJsonStream(std::istream& is); | ||||
| boost::json::value ReadJsonString(std::string_view sv); | ||||
| void               WriteJsonFile(const std::string&        path, | ||||
|                                  const boost::json::value& json, | ||||
|                                  bool                      prettyPrint = true); | ||||
| 
 | ||||
| } // namespace scwx::util::json
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat