Skip to main content
Archived

JSONFragmentor and JSONExtractor should include _json_error{} on rejected featu

Related products:FME Form
  • September 30, 2019
  • 0 replies
  • 11 views
siennaatsafe
jdh
nordpil
  • siennaatsafe
    siennaatsafe
  • jdh
    jdh
  • nordpil
    nordpil

jdh
Contributor
  • Contributor

***Note from Migration:***

Original Title was: JSONFragmentor and JSONExtractor should include _json_error{} on rejected feature


When receiving invalid JSON, the JSONFormatter and JSONFlattener transformers both include _json_error{}.message, _json_error{}.line, _json_error{}.column, _json_error{}.severity attributes in addition to the fme_rejection_code. The JSONFragmenter and JSONExtractor only have the fme_rejection_code, which is often not as useful as one would want.

Additional information is available in the log, but it would be nice if it were available on the feature like the other two JSON transformers.

|WARN  |JSONFragmenter (JSONQueryFactory): Unexpected character: '''. One of the following characters was expected: '"', '}' |INFORM|JSONFragmenter__Rejected_: Feature is: |INFORM|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |INFORM|Feature Type: `JSONFragmenter__Rejected__LOGGED' |INFORM|Attribute(string): `fme_feature_type' has value `Creator' |INFORM|Attribute(string): `fme_geometry' has value `fme_undefined' |INFORM|Attribute(string): `fme_rejection_code' has value `NO_RESULT' |INFORM|Attribute(string): `fme_type' has value `fme_no_geom' |INFORM|Coordinate System: `' |INFORM|Geometry Type: IFMENull

VS

|WARN  |JSONFlattener (JSONQueryFactory): Unexpected character: '}'. The following character was expected: 'l' |INFORM|JSONFlattener__Rejected_: Feature is: |INFORM|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |INFORM|Feature Type: `JSONFlattener__Rejected__LOGGED' |INFORM|Attribute(encoded: UTF-8): `_json_error{0}.column' has value `419' |INFORM|Attribute(encoded: UTF-8): `_json_error{0}.line' has value `1' |INFORM|Attribute(encoded: UTF-8): `_json_error{0}.message' has value `Unexpected character: '}'. The following character was expected: 'l'' |INFORM|Attribute(encoded: UTF-8): `_json_error{0}.severity' has value `invalid value' |INFORM|Attribute(string)        : `fme_feature_type' has value `Creator' |INFORM|Attribute(string)        : `fme_geometry' has value `fme_undefined' |INFORM|Attribute(string)        : `fme_rejection_code' has value `NO_RESULT' |INFORM|Attribute(string)        : `fme_type' has value `fme_no_geom'
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings