You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Mr Havercamp <mr...@gmail.com> on 2011/05/18 10:44:09 UTC
Track Number for MP3 generating invalid JSON
I am using PHP with Tika to extract information about various Joomla!
attachments before sending them to Solr.
I use the JSON flag to extract a file's metadata which in most cases
results in valid JSON.
However, I've noticed with MP3s that the track number is not always quoted:
"xmpDM:trackNumber":00
but in other instances it is:
"xmpDM:trackNumber":"5/10"
The first instance will lead to PHP's json decode method reporting an
invalid syntax error, the second instance will decode successfully.
Cheers
Hayden
Re: Track Number for MP3 generating invalid JSON
Posted by Mr Havercamp <mr...@gmail.com>.
On 18/05/11 18:11, Nick Burch wrote:
> On Wed, 18 May 2011, Mr Havercamp wrote:
>> However, I've noticed with MP3s that the track number is not always
>> quoted:
>>
>> "xmpDM:trackNumber":00
>
> The number outputting in json wasn't handling the case of a zero
> padded number. Should be fixed in r1124165, and you'll now get
> "xmpDM:trackNumber":0,
>
> Nick
Great thanks. Confirming it works for me also.
Re: Track Number for MP3 generating invalid JSON
Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 18 May 2011, Mr Havercamp wrote:
> However, I've noticed with MP3s that the track number is not always quoted:
>
> "xmpDM:trackNumber":00
The number outputting in json wasn't handling the case of a zero padded
number. Should be fixed in r1124165, and you'll now get
"xmpDM:trackNumber":0,
Nick