nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattyb149 <>
Subject [GitHub] nifi pull request #2063: NIFI-4269 Added the ability to serialize Mongo docu...
Date Tue, 22 Aug 2017 14:01:39 GMT
Github user mattyb149 commented on a diff in the pull request:
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/
    @@ -120,12 +123,30 @@ public ValidationResult validate(final String subject, final String
value, final
    +    static final String JSON_TYPE_EXTENDED = "Extended";
    +    static final String JSON_TYPE_NORMAL   = "Normal";
    +    static final AllowableValue JSON_EXTENDED = new AllowableValue(JSON_TYPE_EXTENDED,
"Extended JSON",
    +            "Use MongoDB's \"extended JSON\". This is the JSON generated with toJson()
on a MongoDB Document from the Java driver");
    +    static final AllowableValue JSON_NORMAL = new AllowableValue(JSON_TYPE_NORMAL, "Normal
    +            "Use Jackson to convert the MongoDB Document into a representation that uses
only standard JSON");
    +    static final PropertyDescriptor JSON_TYPE = new PropertyDescriptor.Builder()
    +            .allowableValues(JSON_EXTENDED, JSON_NORMAL)
    +            .defaultValue(JSON_TYPE_EXTENDED)
    +            .displayName("JSON Type")
    +            .name("json-type")
    +            .description("By default, MongoDB's Java driver returns \"extended JSON\".
Some of the features of this variant of JSON" +
    +            " may cause problems for other JSON parsers that expect only standard JSON
types and conventions. This configuration setting " +
    +            " controls whether to use extended JSON or provide a clean view that conforms
to standard JSON.")
    +            .expressionLanguageSupported(false)
    +            .build();
    --- End diff --
    Another nitpick :)  Although there are only two allowable values and the default is one
of them, for consistency this field should be required(true).
    Also do you think it would be helpful to add some/all of this description to the processor's
CapabilityDescription too? That description is pretty thin, and this is a nice added feature
so might be good to draw more attention to it :)

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message