node.js - how can I parse url query string by C++? -
is there light-weight library this?
i'm use node.js parse url log file, found it's slow it's default module querystring
, tj's qs
.
so wonder if there c++ library parse url (better json string directly) , it's light-weight enough compile node c++ addon.
qs.parse('/?0=foo') qs.parse('/?a[>=]=23') qs.parse('/?foo=bar&baz') qs.parse('/?a[b][c]=d') qs.parse('/?a[b][c][d]=e') qs.parse('/?a=b&a=c') qs.parse('/?a[]=b') qs.parse('/?a[]=b&a[]=c&a[]=d') qs.parse('/?a=b&a[]=c') qs.parse('/?a[]=b&a=c') qs.parse('/?a=b&a[0]=c') qs.parse('/?a=b&a[1]=c') qs.parse('/?a[b][]=c&a[b][]=d') qs.parse('/?a[1]=c&a[0]=b&a[2]=d') qs.parse('/?a[1]=c&a[0]=b') qs.parse('/?a[20]=a') qs.parse('/?a[12b]=c') qs.parse('/?he%3dllo=th%3dere') qs.parse('/?a[b]=c%20d') qs.parse('/?foo[0]=bar&foo[bad]=baz') qs.parse('/?foo[bad]=baz&foo[0]=bar') qs.parse('/?foo[]=bar&foo[bad]=baz') qs.parse('/?foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb') qs.parse('/?a[]=b&a[t]=u&a[hasownproperty]=c') qs.parse('/?foo[0].baz=bar&fool.bad=baz') // ...
well, can feel problem?
you can use cpp-netlib library , in particular uri class (boost::network::http::uri). more information here.
Comments
Post a Comment