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,53 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Zhaizj.Framework.Serialization {
internal abstract class JsonParserBase {
protected CharSource charSrc;
protected abstract void parse();
public abstract Object getResult();
public JsonParserBase() {
}
public JsonParserBase( CharSource charSrc ) {
this.charSrc = charSrc;
parse();
}
protected JsonParserBase moveAndGetParser() {
charSrc.moveToText();
char c = charSrc.getCurrent();
if (c == '"' || c == '\'') {
return new StringJsonParser( this.charSrc, c );
}
if (c == '{') {
charSrc.back();
return new ObjectJsonParser( this.charSrc );
}
if (c == '[') {
charSrc.back();
return new ArrayJsonParser( this.charSrc );
}
return new ValueJsonParser( this.charSrc );
}
protected JsonParserException ex( String msg ) {
return new JsonParserException( msg + "(index:"+this.charSrc.getIndex().ToString()+")\n" + this.charSrc.strSrc );
}
}
}