开发者

KRL convert XML to JSON

开发者 https://www.devze.com 2023-03-07 04:56 出处:网络
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 \'A

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

精彩评论

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