在 com.alibaba.fastjson.parser.JSONLexerBase#skipWhitespace
```java
publicfinalvoidskipWhitespace(){
while(true){
while(true){
if(this.ch<='/'){
if(this.ch==''||this.ch=='\r'||this.ch=='\n'||this.ch=='\t'||this.ch=='\f'||this.ch=='\b'){
this.next();
continue;
}
if(this.ch=='/'){
this.skipComment(); continue;
}
}
return;
}
}
}
不难看出默认会去除键、值外的空格、\b、\n、\r、\f等,作为开胃菜
本文详细解释了阿里巴巴Fastjson库中`JSONLexerBase`类的`skipWhitespace`方法,该方法用于处理JSON数据中的默认空白字符移除,包括空格、换行符等,以及处理注释的逻辑。
4330





