- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/JSON/JSONBoolean.cs
r325 r351 5 5 private readonly bool value; 6 6 7 public JSONBoolean (bool value) {8 this.value =value;7 public JSONBoolean (bool _value) { 8 value = _value; 9 9 } 10 10 … … 13 13 } 14 14 15 public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, intcurrentLevel = 0) {16 stringBuilder.Append (value ? "true" : "false");15 public override void ToString (StringBuilder _stringBuilder, bool _prettyPrint = false, int _currentLevel = 0) { 16 _stringBuilder.Append (value ? "true" : "false"); 17 17 } 18 18 19 public static JSONBoolean Parse (string json, ref intoffset) {19 public static JSONBoolean Parse (string _json, ref int _offset) { 20 20 //Log.Out ("ParseBool enter (" + offset + ")"); 21 21 22 if ( json.Substring (offset, 4).Equals ("true")) {22 if (_json.Substring (_offset, 4).Equals ("true")) { 23 23 //Log.Out ("JSON:Parsed Bool: true"); 24 offset += 4;24 _offset += 4; 25 25 return new JSONBoolean (true); 26 26 } 27 27 28 if ( json.Substring (offset, 5).Equals ("false")) {28 if (_json.Substring (_offset, 5).Equals ("false")) { 29 29 //Log.Out ("JSON:Parsed Bool: false"); 30 offset += 5;30 _offset += 5; 31 31 return new JSONBoolean (false); 32 32 }
Note:
See TracChangeset
for help on using the changeset viewer.