init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Zhaizj.Framework.Serialization {
internal class StringJsonParser : ValueJsonParser {
private String _result;
public override Object getResult() {
return _result;
}
public StringJsonParser( CharSource charSrc, char c ) {
this.quote = c;
this.charSrc = charSrc;
parse();
}
private char quote = '"';
protected override void parse() {
charSrc.move();
char c = charSrc.getCurrent();
if (c == '\n' || c == '\r') throw ex( "String ends at a new line while not end" );
if (c == quote) {
_result = sb.ToString();
return;
}
if (c == '\\')
processEscape();
else
sb.Append( c );
parse();
}
}
}