开发者

KRL convert XML to JSON

I'm working on a KRL module for S3. Each request has to be signed, and the signature covers a Date object which has to be within 15 minutes of the current time on AWS. The signature is sent as an 'Authorization' HTTP header.

If I set it up as a datasource I would get the XML > JSON for free. Unfortunately you can't set headers for a datasource request.

I tried content.as('json') but that converts JSON in a string to 开发者_如何学Cactual Javascript objects.

k=xml_string.as('json') // returns the xml_string unchanged

How can I convert the returned XML to JSON?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜