Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–107 unchanged (107 lines)
108 ctxt.defaultSerializeNull(gen);
109 } else if (_value instanceof JsonSerializable) {
110 ((JsonSerializable) _value).serialize(gen, ctxt);
111 } else {
112 // 25-May-2018, tatu: [databind#1991] do not call via generator but through context;
113 // this to preserve contextual information
114 gen.writeObject(_value);
115 }
116 }
117
118 /*
119 /**********************************************************
120 /* Extended API
…lines 121–173 unchanged (53 lines)

After

…lines 1–107 unchanged (107 lines)
108 ctxt.defaultSerializeNull(gen);
109 } else if (_value instanceof JsonSerializable) {
110 ((JsonSerializable) _value).serialize(gen, ctxt);
111 } else {
112 // 25-May-2018, tatu: [databind#1991] do not call via generator but through context;
113 // this to preserve contextual information
114 ctxt.defaultSerializeValue(_value, gen);
115 }
116 }
117
118 /*
119 /**********************************************************
120 /* Extended API
…lines 121–173 unchanged (53 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonSerializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "SerializerProvider"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "RawValue"
; ";"
block_comment "/**\n * Value node that contains a wrapped POJO, to be serial"...
class_declaration
modifiers
public "public"
class "class"
identifier "POJONode"
superclass
extends "extends"
type_identifier "ValueNode"
class_body
{ "{"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Object"
variable_declarator
identifier "_value"
; ";"
constructor_declaration
modifiers
public "public"
identifier "POJONode"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "v"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
identifier "_value"
= "="
identifier "v"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
block_comment "/**\n * As it is possible that some implementations embed"...
method_declaration (+62 nodes collapsed)
block_comment "/* \n /***************************************************"...
method_declaration (+38 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+52 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
final "final"
void_type "void"
identifier "serialize"
formal_parameters
( "("
formal_parameter
type_identifier "JsonGenerator"
identifier "gen"
, ","
formal_parameter
type_identifier "SerializerProvider"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "_value"
== "=="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "ctxt"
. "."
identifier "defaultSerializeNull"
argument_list
( "("
identifier "gen"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "_value"
instanceof "instanceof"
type_identifier "JsonSerializable"
) ")"
block (+22 nodes collapsed)
else "else"
block
{ "{"
line_comment "// 25-May-2018, tatu: [databind#1991] do not call via genera"...
line_comment "// this to preserve contextual information"
expression_statement
method_invocation
identifier "gen"
. "."
identifier "writeObject"
argument_list
( "("
identifier "_value"
) ")"
; ";"
} "}"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that can be used to access the POJO this n"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getPojo"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_value"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * @since 2.3\n */"
method_declaration (+50 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration (+115 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "node"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "JsonSerializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "SerializerProvider"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "util"
. "."
identifier "RawValue"
; ";"
block_comment "/**\n * Value node that contains a wrapped POJO, to be serial"...
class_declaration
modifiers
public "public"
class "class"
identifier "POJONode"
superclass
extends "extends"
type_identifier "ValueNode"
class_body
{ "{"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Object"
variable_declarator
identifier "_value"
; ";"
constructor_declaration
modifiers
public "public"
identifier "POJONode"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "v"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
identifier "_value"
= "="
identifier "v"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
block_comment "/**\n * As it is possible that some implementations embed"...
method_declaration (+62 nodes collapsed)
block_comment "/* \n /***************************************************"...
method_declaration (+38 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+52 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
final "final"
void_type "void"
identifier "serialize"
formal_parameters
( "("
formal_parameter
type_identifier "JsonGenerator"
identifier "gen"
, ","
formal_parameter
type_identifier "SerializerProvider"
identifier "ctxt"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "_value"
== "=="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "ctxt"
. "."
identifier "defaultSerializeNull"
argument_list
( "("
identifier "gen"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
instanceof_expression
identifier "_value"
instanceof "instanceof"
type_identifier "JsonSerializable"
) ")"
block (+22 nodes collapsed)
else "else"
block
{ "{"
line_comment "// 25-May-2018, tatu: [databind#1991] do not call via genera"...
line_comment "// this to preserve contextual information"
expression_statement
method_invocation
identifier "ctxt"
. "."
identifier "defaultSerializeValue"
argument_list
( "("
identifier "_value"
, ","
identifier "gen"
) ")"
; ";"
} "}"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that can be used to access the POJO this n"...
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "getPojo"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "_value"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * @since 2.3\n */"
method_declaration (+50 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration (+115 nodes collapsed)
} "}"