Patches: Browse | Submit New | Admin

[#18934] Improvment: use JSON lib + parsing json gmail format fixed

Date:
2008-03-19 09:14
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Improvment: use JSON lib + parsing json gmail format fixed

Detailed description
require 'json'

... 
def __fetch(query)
...
        matches = inbox.scan(/D\((.*)\)/).flatten
        packets = {}
        matches.each do |x|
>>         x=x.gsub(/,(?=,)/,",null")
>>         x=x.gsub(/(\t)/,"")
>>         tmp= JSON.parse(x)
....

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item