mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:20:05 +00:00 
			
		
		
		
	Initial loading of JSON-based settings
This commit is contained in:
		
							parent
							
								
									28ea12cbfe
								
							
						
					
					
						commit
						1c0140fc98
					
				
					 8 changed files with 561 additions and 38 deletions
				
			
		
							
								
								
									
										27
									
								
								scwx-qt/source/scwx/qt/util/json.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								scwx-qt/source/scwx/qt/util/json.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <boost/json.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace util | ||||
| { | ||||
| namespace json | ||||
| { | ||||
| 
 | ||||
| bool FromJsonString(const boost::json::object& json, | ||||
|                     const std::string&         key, | ||||
|                     std::string&               value, | ||||
|                     const std::string&         defaultValue); | ||||
| 
 | ||||
| boost::json::value ReadJsonFile(const std::string& path); | ||||
| void               WriteJsonFile(const std::string&        path, | ||||
|                                  const boost::json::value& json, | ||||
|                                  bool                      prettyPrint = true); | ||||
| 
 | ||||
| } // namespace json
 | ||||
| } // namespace util
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat