Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

fix enum to wson duplicate quote #3236

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/sdk/src/main/java/org/apache/weex/wson/Wson.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private final Object readObject(){

private final Object readMap(){
int size = readUInt();
Map<String, Object> object = new JSONObject();;
Map<String, Object> object = new JSONObject();
for(int i=0; i<size; i++){
String key = readMapKeyUTF16();
Object value = readObject();
Expand Down Expand Up @@ -498,7 +498,7 @@ private final void writeObject(Object object) {
}else {
refs.add(object);
if(object.getClass().isEnum()){
writeObject(JSON.toJSONString(object));
writeObject(JSON.toJSONString(object).replaceAll("\"|'", ""));
}else{
writeAdapterObject(object);
}
Expand Down