How to add comment support?

  • tangxinfa

    I want to add a comment field for every object, such as class, member function and member variable, when i dump a class object it will display like bellow:
        class person
        {"type":"class", "name":"person", "comment" : "comment of class person"}
            {"type":"string", "name":"name", "comment" : "name of a person"}
            {"type":"int", "name":"age", "comment" : "age of a person"}
    the comment support is useful when i want to mark a class is serializable, and then generate serializer method for that class, a example c++ header file:

    /// login message, it is marked as serializable.
    /// @serializable
    class login
         string name;         /**< name */
         string password;  /**< password */

    • Currently does not support parsing comments.  I will add it to the wishlist.  Keep your eyes open for a future release.

  • Please try version 1.8.  It parses doxygen comments and creates a key called "doxygen"