Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Serializing IScanIssues

tanner barnes Aug 14, 2019 07:45PM UTC

Hello Support Team,

So I have created an implementation of IScanIssue but I am getting errors when trying to JSON encode the class like this:

"java.lang.IllegalArgumentException: jdk.internal.ref.PhantomCleanable<?> declares multiple JSON fields named next"

Here is my class:

package teamExtension;

import burp.IHttpRequestResponse;
import burp.IHttpService;
import burp.IScanIssue;

import java.net.URL;

public class ScanIssue implements IScanIssue {

private URL url;
private String issueName;
private int issueType;
private String issueSeverity;
private String issueConfidence;
private String issueBackground;
private String issueRemediationBackground;
private String issueDetail;
private String issueRemediationDetail;
private IHttpRequestResponse[] requestsResponses;
private IHttpService httpService;

public ScanIssue(){
}

ScanIssue(IScanIssue scanIssueCopy) {
this.setUrl(scanIssueCopy.getUrl());
this.setIssueName(scanIssueCopy.getIssueName());
this.setIssueType(scanIssueCopy.getIssueType());
this.setIssueSeverity(scanIssueCopy.getSeverity());
this.setIssueConfidence(scanIssueCopy.getConfidence());
this.setIssueBackground(scanIssueCopy.getIssueBackground());
this.setIssueRemediationBackground(scanIssueCopy.getRemediationBackground());
this.setIssueDetail(scanIssueCopy.getIssueDetail());
this.setIssueRemediationDetail(scanIssueCopy.getRemediationDetail());
this.setRequestsResponses(scanIssueCopy.getHttpMessages());
this.setHttpService(scanIssueCopy.getHttpService());

}

public void setUrl(URL url) {
this.url = url;
}

private void setIssueName(String issueName) {
this.issueName = issueName;
}

private void setIssueType(int issueType) {
this.issueType = issueType;
}

private void setIssueSeverity(String issueSeverity) {
this.issueSeverity = issueSeverity;
}

private void setIssueConfidence(String issueConfidence) {
this.issueConfidence = issueConfidence;
}

private void setIssueBackground(String issueBackground) {
this.issueBackground = issueBackground;
}

private void setIssueRemediationBackground(String issueRemediationBackground) {
this.issueRemediationBackground = issueRemediationBackground;
}

private void setIssueDetail(String issueIssueDetail) {
this.issueDetail = issueIssueDetail;
}

private void setIssueRemediationDetail(String issueRemediationDetail) {
this.issueRemediationDetail = issueRemediationDetail;
}

private void setRequestsResponses(IHttpRequestResponse[] requestsResponses) {
this.requestsResponses = requestsResponses;
}

private void setHttpService(IHttpService httpService) {
this.httpService = httpService;
}

@Override
public URL getUrl() {
return this.url;
}

@Override
public String getIssueName() {
return this.issueName;
}

@Override
public int getIssueType() {
return this.issueType;
}

@Override
public String getSeverity() {
return this.issueSeverity;
}

@Override
public String getConfidence() {
return this.issueConfidence;
}

@Override
public String getIssueBackground() {
return this.issueBackground;
}

@Override
public String getRemediationBackground() {
return this.issueRemediationBackground;
}

@Override
public String getIssueDetail() {
return this.issueDetail;
}

@Override
public String getRemediationDetail() {
return this.issueRemediationDetail;
}

@Override
public IHttpRequestResponse[] getHttpMessages() {
return this.requestsResponses;
}

@Override
public IHttpService getHttpService() {
return this.httpService;
}
}

Is it possible to serialize these objects or are there hidden fields on the interface that need to be ignored?


Liam Tai-Hogan Aug 15, 2019 01:52PM UTC Support Center agent

We have a bit of a backlog in terms of Extensions issues. Please accept our apologies, we’ll get back to you as soon as we can.


tanner barnes Aug 29, 2019 08:59PM UTC
I solved this issue.

Mike Eaton Sep 02, 2019 02:21PM UTC Support Center agent

Hi Tanner,

That’s great, please can you share with us your solution so we can help other users with similar issues in the future?

We apologize for the delayed response, we are currently working through the backlog of Extension API queries.

Please let us know if you need any further assistance.


Post Your public answer

Your name
Your email address
Answer