You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Andrew Sammut <as...@kixeye.com> on 2014/03/31 07:11:54 UTC
morphline - detecting mime type
Hi all,
Has anyone used detectMimetype to validate whether the attachment appears
to be legitimate json prior to the execution of readJson?
Regards,
Andrew S
--
Andrew Sammut
Lead Reliability Engineer (AUS)
Mobile: +61 (0)435 072 784
Google Voice: +1 (415) 548 1927
Email: asammut@kixeye.com
Skype: kix.asammut
Re: morphline - detecting mime type
Posted by Wolfgang Hoschek <wh...@cloudera.com>.
detectMimetype can’t detect whether it’s valid JSON, it can at most see whether it looks like JSON in the first few bytes. Consider wrapping the readJson in a tryRules command to handle it.
On Mar 30, 2014, at 10:11 PM, Andrew Sammut <as...@kixeye.com> wrote:
>
> Hi all,
>
> Has anyone used detectMimetype to validate whether the attachment appears to be legitimate json prior to the execution of readJson?
>
> Regards,
> Andrew S
>
> --
> Andrew Sammut
> Lead Reliability Engineer (AUS)
>
> Mobile: +61 (0)435 072 784
> Google Voice: +1 (415) 548 1927
> Email: asammut@kixeye.com
> Skype: kix.asammut