<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 7, 2019 at 6:36 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On jeudi 7 novembre 2019 17:40:08 CET Alessandro Pasotti wrote:<br>
> Hi,<br>
> <br>
> I'm running into an issue with OAPIF and blob/binary fields, the<br>
> QgsJsonExporter does not currently handle that kind of field and just<br>
> convert them to string (whatever that means).<br>
> <br>
> This is clearly wrong in case the blob does not contain ascii or UTF-8, I<br>
> think the way to go might be to base64 the blob but I'd like to know if<br>
> anyone has a better idea.<br>
<br>
Initially, I was going to suggest perhaps to wrap it inside an object with an <br>
explicit base64 member<br>
<br>
like:<br>
<br>
"my_binary_property": {<br>
        "base64": "...."<br>
}<br>
<br>
But after looking at<br>
<a href="https://json-schema.org/latest/json-schema-validation.html#rfc.section.8.3" rel="noreferrer" target="_blank">https://json-schema.org/latest/json-schema-validation.html#rfc.section.8.3</a><br>
<a href="https://json-schema.org/latest/json-schema-validation.html#rfc.section.8.6" rel="noreferrer" target="_blank">https://json-schema.org/latest/json-schema-validation.html#rfc.section.8.6</a><br>
<br>
perhaps just putting it at top level ( "my_binary_property": <br>
"base64contenthere" } is fine as you can tag this string property with <br>
"contentEncoding": "base64"<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div><br clear="all"><div>Thank you and Renè for the feedback!</div><div><br></div><div>Are you talking about the schema ?</div><div><br></div><div>this is the geojson payload I'm testing with:</div><div><br></div><div>{<br>        "geometry": {<br>            "coordinates": [[<br>            7.247,<br>            44.814<br>            ]],<br>            "type": "MultiPoint"<br>        },<br>        "properties": {<br>            "blob_1": "dGVzdA=="<br>        },<br>        "type": "Feature"<br>        }</div><div>}</div><br><div></div><div>Full tests are here: <a href="https://github.com/qgis/QGIS/pull/32694/files#diff-2ea9f4a74bb6c60e8e586fbc9ad808a2R522">https://github.com/qgis/QGIS/pull/32694/files#diff-2ea9f4a74bb6c60e8e586fbc9ad808a2R522</a></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>