yamlbeans icon indicating copy to clipboard operation
yamlbeans copied to clipboard

How to generate yml file for a Java class object

Open NandishAndDev opened this issue 10 years ago • 3 comments

This library can generate yml file for a java object given,I wanted to generate yml for the Java class object. This is to get the schema of the java class object. We have libraries to get java class to JSON . For a complex POJO, the JSON is cryptic and I prefer to have a yml representation.

Example From

public class Phone {
    public String name;
    public String number;
}

To

Phone:
    fields:
      name:
        type: String
      number:
        type: String

NandishAndDev avatar Oct 30 '15 07:10 NandishAndDev

Do we have any plugin in Intellij or Eclipse to generate YAML representation of Java POJO ?

Anshulrathi avatar Sep 19 '19 16:09 Anshulrathi

Not that I know of, sorry.

On Thu, Sep 19, 2019, 6:43 AM Anshulrathi [email protected] wrote:

Do we have any plugin in Intellij or Eclipse to generate YAML representation of Java POJO ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EsotericSoftware/yamlbeans/issues/41?email_source=notifications&email_token=AADJ6WTMVCT3HWWYHQJQVULQKOT4VA5CNFSM4BTDFMQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EDMAY#issuecomment-533214723, or mute the thread https://github.com/notifications/unsubscribe-auth/AADJ6WTSEQLZ5UR2B2DELXDQKOT4VANCNFSM4BTDFMQQ .

NathanSweet avatar Sep 20 '19 05:09 NathanSweet

Thanks !! I resolved my problem using below reference point. https://www.logicbig.com/tutorials/misc/yaml/java-to-yaml.html

Anshulrathi avatar Sep 20 '19 13:09 Anshulrathi