[
https://issues.apache.org/jira/browse/NIFI-4269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16136831#comment-16136831
]
ASF GitHub Bot commented on NIFI-4269:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2063#discussion_r134485602
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
---
@@ -120,12 +123,30 @@ public ValidationResult validate(final String
subject, final String value, final
.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
.build();
+ 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 JSON",
--- End diff --
Should this be "Standard JSON" rather than "Normal JSON"? Both terms are
overloaded, but the description refers to it as "standard JSON". Also mention
of Jackson is an implementations-specific detail and not necessary for the user
documentation (plus if the underlying impl changes we'd have to remember to
change this too).
> GetMongo should be able to provide pure JSON as well as "extended JSON"
> -----------------------------------------------------------------------
>
> Key: NIFI-4269
> URL: https://issues.apache.org/jira/browse/NIFI-4269
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Mike Thomsen
>
> GetMongo currently only supports "extended JSON." That results in ugly JSON
> like this:
> {
> "timestamp": {
> "$date": LONG_TIMESTAMP
> }
> }
> instead of something cleaner like this:
> {
> "timestamp": "2017-08-07T00:00:00Z"
> }
> GetMongo should be refactored to support both modes of JSON serialization.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)