Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 4 additions & 0 deletions src/main/java/com/github/fge/jsonpatch/DualPathOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public final void serializeWithType(final JsonGenerator jgen,
serialize(jgen, provider);
}

public JsonPointer getFrom() {
Comment thread
GavinF17 marked this conversation as resolved.
Outdated
return from;
}

@Override
public final String toString()
{
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/github/fge/jsonpatch/JsonPatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ public JsonNode apply(final JsonNode node)
return ret;
}

public List<JsonPatchOperation> getOperations() {
return operations;
}

@Override
public String toString()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ protected JsonPatchOperation(final String op, final JsonPointer path)
public abstract JsonNode apply(final JsonNode node)
throws JsonPatchException;

public String getOp() {
return op;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this protectively copy the string?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't have thought this is necessary as String is immutable, if I'm not thinking of something can you please explain?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're right.

}

public JsonPointer getPath() {
return path;
}

@Override
public abstract String toString();
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public final void serializeWithType(final JsonGenerator jgen,
serialize(jgen, provider);
}

public JsonNode getValue() {
return value;
Comment thread
GavinF17 marked this conversation as resolved.
Outdated
}

@Override
public final String toString()
{
Expand Down