test_class.file: wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializerTest.java
test_class.identifier: JsonSerializerTest
test_case.body: @Test
  	public void testJacksonObjectToJsonError() {
  		Object obj = new Object() {
  			@SuppressWarnings("unused")
  			public String getData() throws JsonGenerationException {
  				throw new JsonGenerationException("Test exception");
  			}
  		};
  
  		String result = JsonSerializer.jacksonObjectToString(obj);
  		assertNull(result);
  	}
test_case.class_method_signature: JsonSerializerTest.testJacksonObjectToJsonError()
test_case.full_signature: @Test public void testJacksonObjectToJsonError()
test_case.identifier: testJacksonObjectToJsonError
test_case.invocations: jacksonObjectToString assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJacksonObjectToJsonError()
focal_class.declarator: logger = LoggerFactory.getLogger(JsonSerializer.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(JsonSerializer.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: JSON_START_LIST = "[\n".getBytes(StandardCharsets.UTF_8)
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] JSON_START_LIST = "[\n".getBytes(StandardCharsets.UTF_8);
focal_class.type: byte[]
focal_class.var_name: JSON_START_LIST
focal_class.declarator: JSON_SEP = ",\n".getBytes(StandardCharsets.UTF_8)
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] JSON_SEP = ",\n".getBytes(StandardCharsets.UTF_8);
focal_class.type: byte[]
focal_class.var_name: JSON_SEP
focal_class.declarator: JSON_END_LIST = "\n]".getBytes(StandardCharsets.UTF_8)
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] JSON_END_LIST = "\n]".getBytes(StandardCharsets.UTF_8);
focal_class.type: byte[]
focal_class.var_name: JSON_END_LIST
focal_class.declarator: outputStream
focal_class.modifier: private final
focal_class.original_string: private final OutputStream outputStream;
focal_class.type: OutputStream
focal_class.var_name: outputStream
focal_class.declarator: mapper = new ObjectMapper()
focal_class.modifier: protected static final
focal_class.original_string: protected static final ObjectMapper mapper = new ObjectMapper();
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.declarator: entityDocumentCount
focal_class.modifier: private
focal_class.original_string: private int entityDocumentCount;
focal_class.type: int
focal_class.var_name: entityDocumentCount
focal_class.file: wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializer.java
focal_class.identifier: JsonSerializer
focal_class.interfaces: implements EntityDocumentDumpProcessor
focal_class.class_method_signature: JsonSerializer.JsonSerializer(OutputStream outputStream)
focal_class.full_signature: public  JsonSerializer(OutputStream outputStream)
focal_class.identifier: JsonSerializer
focal_class.modifiers: public
focal_class.parameters: (OutputStream outputStream)
focal_class.signature:  JsonSerializer(OutputStream outputStream)
focal_class.class_method_signature: JsonSerializer.open()
focal_class.full_signature: @Override public void open()
focal_class.identifier: open
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void open()
focal_class.class_method_signature: JsonSerializer.processItemDocument(ItemDocument itemDocument)
focal_class.full_signature: @Override public void processItemDocument(ItemDocument itemDocument)
focal_class.identifier: processItemDocument
focal_class.modifiers: @Override public
focal_class.parameters: (ItemDocument itemDocument)
focal_class.return: void
focal_class.signature: void processItemDocument(ItemDocument itemDocument)
focal_class.class_method_signature: JsonSerializer.processPropertyDocument(PropertyDocument propertyDocument)
focal_class.full_signature: @Override public void processPropertyDocument(PropertyDocument propertyDocument)
focal_class.identifier: processPropertyDocument
focal_class.modifiers: @Override public
focal_class.parameters: (PropertyDocument propertyDocument)
focal_class.return: void
focal_class.signature: void processPropertyDocument(PropertyDocument propertyDocument)
focal_class.class_method_signature: JsonSerializer.processLexemeDocument(LexemeDocument lexemeDocument)
focal_class.full_signature: @Override public void processLexemeDocument(LexemeDocument lexemeDocument)
focal_class.identifier: processLexemeDocument
focal_class.modifiers: @Override public
focal_class.parameters: (LexemeDocument lexemeDocument)
focal_class.return: void
focal_class.signature: void processLexemeDocument(LexemeDocument lexemeDocument)
focal_class.class_method_signature: JsonSerializer.processMediaInfoDocument(MediaInfoDocument mediaInfoDocument)
focal_class.full_signature: @Override public void processMediaInfoDocument(MediaInfoDocument mediaInfoDocument)
focal_class.identifier: processMediaInfoDocument
focal_class.modifiers: @Override public
focal_class.parameters: (MediaInfoDocument mediaInfoDocument)
focal_class.return: void
focal_class.signature: void processMediaInfoDocument(MediaInfoDocument mediaInfoDocument)
focal_class.class_method_signature: JsonSerializer.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: JsonSerializer.getEntityDocumentCount()
focal_class.full_signature: public int getEntityDocumentCount()
focal_class.identifier: getEntityDocumentCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getEntityDocumentCount()
focal_class.class_method_signature: JsonSerializer.reportException(Exception e)
focal_class.full_signature: private void reportException(Exception e)
focal_class.identifier: reportException
focal_class.modifiers: private
focal_class.parameters: (Exception e)
focal_class.return: void
focal_class.signature: void reportException(Exception e)
focal_class.class_method_signature: JsonSerializer.serializeEntityDocument(EntityDocument entityDocument)
focal_class.full_signature: private void serializeEntityDocument(EntityDocument entityDocument)
focal_class.identifier: serializeEntityDocument
focal_class.modifiers: private
focal_class.parameters: (EntityDocument entityDocument)
focal_class.return: void
focal_class.signature: void serializeEntityDocument(EntityDocument entityDocument)
focal_class.class_method_signature: JsonSerializer.getJsonString(ItemDocument itemDocument)
focal_class.full_signature: public static String getJsonString(ItemDocument itemDocument)
focal_class.identifier: getJsonString
focal_class.modifiers: public static
focal_class.parameters: (ItemDocument itemDocument)
focal_class.return: String
focal_class.signature: String getJsonString(ItemDocument itemDocument)
focal_class.class_method_signature: JsonSerializer.getJsonString(PropertyDocument propertyDocument)
focal_class.full_signature: public static String getJsonString(PropertyDocument propertyDocument)
focal_class.identifier: getJsonString
focal_class.modifiers: public static
focal_class.parameters: (PropertyDocument propertyDocument)
focal_class.return: String
focal_class.signature: String getJsonString(PropertyDocument propertyDocument)
focal_class.class_method_signature: JsonSerializer.getJsonString(MediaInfoDocument mediaInfoDocument)
focal_class.full_signature: public static String getJsonString(MediaInfoDocument mediaInfoDocument)
focal_class.identifier: getJsonString
focal_class.modifiers: public static
focal_class.parameters: (MediaInfoDocument mediaInfoDocument)
focal_class.return: String
focal_class.signature: String getJsonString(MediaInfoDocument mediaInfoDocument)
focal_class.class_method_signature: JsonSerializer.getJsonString(Statement statement)
focal_class.full_signature: public static String getJsonString(Statement statement)
focal_class.identifier: getJsonString
focal_class.modifiers: public static
focal_class.parameters: (Statement statement)
focal_class.return: String
focal_class.signature: String getJsonString(Statement statement)
focal_class.class_method_signature: JsonSerializer.jacksonObjectToString(Object object)
focal_class.full_signature: protected static String jacksonObjectToString(Object object)
focal_class.identifier: jacksonObjectToString
focal_class.modifiers: protected static
focal_class.parameters: (Object object)
focal_class.return: String
focal_class.signature: String jacksonObjectToString(Object object)
focal_method.body: protected static String jacksonObjectToString(Object object) {
  		try {
  			return mapper.writeValueAsString(object);
  		} catch (JsonProcessingException e) {
  			logger.error("Failed to serialize JSON data: " + e.toString());
  			return null;
  		}
  	}
focal_method.class_method_signature: JsonSerializer.jacksonObjectToString(Object object)
focal_method.full_signature: protected static String jacksonObjectToString(Object object)
focal_method.identifier: jacksonObjectToString
focal_method.invocations: writeValueAsString error toString
focal_method.modifiers: protected static
focal_method.parameters: (Object object)
focal_method.return: String
focal_method.signature: String jacksonObjectToString(Object object)