@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { // We are NOT to call _verifyValueWrite here, because that will be // done when actual serialization of POJO occurs. If we did call it, // state would advance causing exception later on _objectWriteContext.writeValue(this, value); } }
@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not to check if write would work if (rootNode == null) { writeNull(); } else { _objectWriteContext.writeTree(this, rootNode); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeTree(TreeNode rootNode) throws IOException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeTree(TreeNode rootNode) throws IOException, JsonProcessingException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined for the generator, can not serialize JsonNode-based trees"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeTree(TreeNode rootNode) throws IOException, JsonProcessingException { // As with 'writeObject()', we are not check if write would work if (rootNode == null) { writeNull(); } else { if (_objectCodec == null) { throw new IllegalStateException("No ObjectCodec defined for the generator, can not serialize JsonNode-based trees"); } _objectCodec.writeValue(this, rootNode); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeObject(Object value) throws IOException, JsonProcessingException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeObject(Object value) throws IOException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
@Override public void writeObject(Object value) throws IOException, JsonProcessingException { if (value == null) { // important: call method that does check value write: writeNull(); } else { /* 02-Mar-2009, tatu: we are NOT to call _verifyValueWrite here, * because that will be done when codec actually serializes * contained POJO. If we did call it it would advance state * causing exception later on */ if (_objectCodec != null) { _objectCodec.writeValue(this, value); return; } _writeSimpleObject(value); } }
writeNull(); return;
break; case VALUE_NULL: writeNull(); break; case VALUE_EMBEDDED_OBJECT:
break; case VALUE_NULL: writeNull(); break; case VALUE_EMBEDDED_OBJECT: