mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
Get rid of jackson (mostly)
Reviewed By: astreet Differential Revision: D3041362 fb-gh-sync-id: a7027a08a63730b98dc766b86921820fa3624953 shipit-source-id: a7027a08a63730b98dc766b86921820fa3624953
This commit is contained in:
committed by
Facebook Github Bot 8
parent
14555063bb
commit
d329570ac8
@@ -9,8 +9,6 @@
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.systrace.Systrace;
|
||||
|
||||
@@ -325,20 +323,18 @@ public abstract class BaseJavaModule implements NativeModule {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void writeConstantsField(JsonGenerator jg, String fieldName) throws IOException {
|
||||
public final void writeConstantsField(JsonWriter writer, String fieldName) throws IOException {
|
||||
Map<String, Object> constants = getConstants();
|
||||
if (constants == null || constants.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
jg.writeObjectFieldStart(fieldName);
|
||||
writer.name(fieldName).beginObject();
|
||||
for (Map.Entry<String, Object> constant : constants.entrySet()) {
|
||||
JsonGeneratorHelper.writeObjectField(
|
||||
jg,
|
||||
constant.getKey(),
|
||||
constant.getValue());
|
||||
writer.name(constant.getKey());
|
||||
JsonWriterHelper.value(writer, constant.getValue());
|
||||
}
|
||||
jg.writeEndObject();
|
||||
writer.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user