On 6/28/21 10:15 AM, David Hampton via mythtv-dev wrote:
> On Mon, 2021-06-28 at 10:10 -0500, Bill Meek wrote:
>> On 6/28/21 8:39 AM, Peter Bennett wrote:
>>> I have updated the wiki page with instructions on converting
>>> services
>>>
>>> https://www.mythtv.org/wiki/Services_API_V2_Conversion
>>>
>>> If I have anything wrong or left out anything please feel free to
>>> update it or let me know.
>>>
>>> Peter
>>>
>>
>> Thanks! Especially noted: Q_CLASSINFO("GetSavedBookmark",
>> "name=long").
>>
>> Solved 10 Myth service endpoints that currently return Strings or
>> StringLists.
>>
>>
>>
>> Any opinions on the following difference?
>>
>> $ api2 --endpoint Myth/GetHostName
>> ...
>> ********** Myth/GetHostName want's XML response from Original API:
>>
>> <String>ofc0</String>
>>
>> ********** Myth/GetHostName want's XML response from V2 API:
>>
>> <String xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> serializerVersion="1.1">ofc0</String>
>
> The latter is way too verbose, especially if that's added to every
> string. Is there a way to specify it once in the header of the XML
> document?
>
> David
These are the original and v2 raw responses:
bill@ofc0:~$ curl ofc0.local:6544/Myth/GetHostName
<?xml version="1.0" encoding="UTF-8"?><String>ofc0</String>
bill@ofc0:~$ curl ofc0.local:6744/Myth/GetHostName
<?xml version="1.0" encoding="UTF-8"?><String xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" serializerVersion="1.1">ofc0</String>
And for a StringList (to show the xml version etc. isn't repeated per String):
bill@ofc0:~$ curl ofc0.local:6544/Myth/GetKeys
<?xml version="1.0" encoding="UTF-8"?><StringList><String>AC3PassThru</String> ...
bill@ofc0:~$ curl ofc0.local:6744/Myth/GetKeys
<?xml version="1.0" encoding="UTF-8"?><StringList xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" serializerVersion="1.1"><String>AC3PassThru</String><String>...
--
Bill
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev http://wiki.mythtv.org/Mailing_List_etiquette MythTV Forums:
https://forum.mythtv.org