organics2016 / pojo2json

A simple plugin for converting POJO to JSON in IntelliJ IDEA
MIT License
72 stars 37 forks source link

Unable to handle JsonNode #24

Closed alfisti166 closed 1 year ago

alfisti166 commented 1 year ago

Plugin seems not to handle classes that includes JsonNode field. Stack overflow occurs.

public class Asd {
    private JsonNode asd;
}

Is it possible just to generate empty brackets?

organics2016 commented 1 year ago

This is a bug. fix to next release

organics2016 commented 1 year ago

idea64_iWBNwhsREa

This is my test case.

The result shows that although the value is not as expected, but it does not cause a stack overflow. Did you stuff something weird in your Class? eg:

public class Asd extends JsonNode {
    private JsonNode asd;
}

or

public class JsonNode {
    private Asd asd;
}

public class Asd {
    private JsonNode asd;
}
alfisti166 commented 1 year ago

Not really. Let me provide more details. BTW. ObjectNode doesn't cause stack overflow, but generate pretty useless fields.

Screenshot from 2023-03-18 16-45-03 Screenshot from 2023-03-18 16-37-38 Screenshot from 2023-03-18 16-37-04

organics2016 commented 1 year ago

Moderation may take up to two business days. Fix version 1.2.6