JSON for RenderParameters?

ยอดดู 12 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

existdissolve

ยังไม่อ่าน,
31 พ.ค. 2554 20:23:4631/5/54
ถึง Aviary API
Hey guys--

Quick qn: can the RenderParameters argument of the Render() method
take a JSON string? I think I remember that in the former version of
the docs the spec said to send through an XML string of parameters
(e.g., parameters -> parameter: id value).

The XML still works of course, but am wondering if there's support for
JSON instead? I've tried several iterations of JSON, but with no luck.
My app is currently running all JSON except for this one bit, so it
would be awesome if I could use it here too.

If it already does support JSON, could you post an example of a valid
RenderParameters argument?

Thanks!

Ari Fuchs

ยังไม่อ่าน,
2 มิ.ย. 2554 12:20:042/6/54
ถึง avia...@googlegroups.com
Hey there! it does indeed accept JSON. Below is a sample for reference:

xml version:

<filtermetadata>
<parameter uid="0" value="true"></parameter>
<parameter uid="1" value="true"></parameter>
<parameter uid="2" value="true"></parameter>
<parameter uid="3" value="true"></parameter>
<parameter uid="4" value="true"></parameter>
</filtermetadata>

json version:

"filtermetadata":
    {
        "parameters":
        {
            "parameter":
            [
                {
                    "@uid":"0",
                    "@value":"true"
                },
                {
                    "@uid":"1",
                    "@value":"true"
                },
                {
                    "@uid":"2",
                    "@value":"true"
                },
                {
                    "@uid":"3",
                    "@value":"true"
                },
                {
                    "@uid":"4",
                    "@value":"true"
                }
            ]

existdissolve

ยังไม่อ่าน,
2 มิ.ย. 2554 22:42:182/6/54
ถึง Aviary API
Awesome--that did the trick--thanks!!

On Jun 2, 12:20 pm, Ari Fuchs <a...@aviary.com> wrote:
> Hey there! it does indeed accept JSON. Below is a sample for reference:
>
> *xml version:
> *
>
> <filtermetadata>
> <parameter uid="0" value="true"></parameter>
>  <parameter uid="1" value="true"></parameter>
> <parameter uid="2" value="true"></parameter>
>  <parameter uid="3" value="true"></parameter>
> <parameter uid="4" value="true"></parameter>
> </filtermetadata>
>
> *json version:*
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ