You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Jackson JsonParser is used at different places in the project to convert a JSON string into a JsonNode. Reading the string is usually done as follows:
It should be notated that the parser will stop reading the input after it found a valid JsonNode entry, leaving the rest of the string unread. This means that a string like "1 garbage" is accepted and returns a single NumericNode with value 1, ignoring the garbage at the end of the string. For the same reason, parsing "{"name":"value"} garbage" will return an ObjectNode with the name/value pair, leaving garbage unread until the next attempt at reading from the same parser.
Converting a JSON string into a JsonNode is required when processing user-supplied configuration settings (expressed as string in the XML configuration). These fields are meant to contain a valid JSON and should obviously fail or raise an ERROR status in the scenarios described above.
The text was updated successfully, but these errors were encountered:
…tring
Issue #680: no auto-start of JsonProviders
- remove Lifecycle from the JsonProvider interface to prevent Logstash from auto-starting the provider
- declare the start/stop method initially defined by the Lifecycle interface in the JsonProvider interface
- now that start() is called only once, parse the JSON string during start()
Issue #679: remaining characters after reading JSON string
- raise an error if some characters remain after reading a JsonNode out of the string
Issue #680: no auto-start of JsonProviders
- remove Lifecycle from the JsonProvider interface to prevent Logstash from auto-starting the provider
- declare the start/stop method initially defined by the Lifecycle interface in the JsonProvider interface
- now that start() is called only once, parse the JSON string during start()
Issue #679: remaining characters after reading JSON string
- raise an error if some characters remain after reading a JsonNode out of the string
A Jackson
JsonParser
is used at different places in the project to convert a JSON string into aJsonNode
. Reading the string is usually done as follows:It should be notated that the parser will stop reading the input after it found a valid JsonNode entry, leaving the rest of the string unread. This means that a string like
"1 garbage"
is accepted and returns a singleNumericNode
with value1
, ignoring thegarbage
at the end of the string. For the same reason, parsing"{"name":"value"} garbage"
will return an ObjectNode with the name/value pair, leavinggarbage
unread until the next attempt at reading from the same parser.Converting a JSON string into a JsonNode is required when processing user-supplied configuration settings (expressed as string in the XML configuration). These fields are meant to contain a valid JSON and should obviously fail or raise an ERROR status in the scenarios described above.
The text was updated successfully, but these errors were encountered: