EvaluateJSONPath - I'll give that a try. I can't rule out such edge cases. Thank you very much Andy.
On Thu, Aug 16, 2018 at 12:21 PM, Andy LoPresto <[email protected]> wrote: > Jim, > > If the JSON can span multiple lines, you may also want to use > EvaluateJSONPath to extract the value of the *request* key and then > RouteOnAttribute accordingly. Might be slightly more expensive, but may > catch edge cases that a regex would have trouble with. > > Andy LoPresto > [email protected] > *[email protected] <[email protected]>* > PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > > On Aug 16, 2018, at 3:44 AM, James McMahon <[email protected]> wrote: > > Thanks very much for your reply, Mark. Because the description for > RouteText says that it routes each line of the content individually, that > is not what I will use in my case. The requirement I have is to route the > entire flowfile based on whether or not the tokens of interest match > anywhere in the flowfile. I think RouteOnContent is just the thing for me, > I just need to more carefully define my regex pattern. Thank you again for > your help. -Jim > > On Wed, Aug 15, 2018 at 2:06 PM, Mark Payne <[email protected]> wrote: > >> Jim, >> >> I'd recommend RouteText. ScanContent would also be an alternative. >> >> Thanks >> -Mark >> >> >> > On Aug 15, 2018, at 2:02 PM, James McMahon <[email protected]> >> wrote: >> > >> > Good afternoon. I have a requirement to search for and detect a pattern >> "request":"false" is anywhere in the content of a flowfile. The content is >> json that spans multiple lines. My reuest key and value would be on its own >> line, embedded within a tag like this >> > >> > "options":"{ >> > "abc":""12345" >> > "request":"false", >> > . >> > . >> > }" >> > >> > Is there a standard processor that I could use to read my json and >> search for these tokens? >> > Thanks veyr much. >> > Jim >> >> > >
