<div dir="ltr"><div><div><div><div><div><div><div>Dear gus.<br><br></div> In PHP a have a script in which:<br><br></div>1. Read the json array<br></div>2. Code the equivalence between arrays elements and the isis database tags<br></div>3. Process each record of the json array and builds a string with the isis tags in the form of: <br><br></div><tag1 0>CONTENT OF THE ELEMENT 1 OF THE JSON ARRAY EQUIVALENT TO TAG1</tag1><tag2 0>.............<br><br></div>4. The string built with each record ($ValorCapturado) and the name of the database to be updated ($base) are passed to the function GrabarRegistro. In the function, $db_path is the path to the folder where is the database to be updated. <br><br></div><div>You can create a folder (json2isis) and place inside the executable wxis.exe and the IsisScript actualizar.xis attached to this mail.<br></div><div><div><div><div><div><div><div><br><br><span style="font-family:monospace,monospace">function GrabarRegistro($ValorCapturado,$base){<br>global $db_path;<br> $ValorCapturado=urlencode($ValorCapturado);<br> $query="&base=$base&cipar=$db_path"."par/$base".".par&login=ABCD&path_db=$db_path";<br> $query.="&ValorCapturado=".$ValorCapturado."&Opcion=crear";<br> putenv('REQUEST_METHOD=GET');<br> putenv('QUERY_STRING='."?xx=".$query);<br> $Wxis="wxis.exe" ;<br> IF (stripos(PHP_OS,"win")===false)<br> $Wxis="./".$Wxis;<br> $IsisScript="actualizar.xis";<br> exec("\"./".$Wxis."\" IsisScript=$IsisScript",$contenido);<br> $contenido=implode("\n",$contenido);<br> return $contenido;<br>}<br><br><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">Hope it helps</span><span style="font-family:monospace,monospace"><br><br></span></div><div><span style="font-family:monospace,monospace">Regards, <br></span></div><div><br><br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 10:25 AM, gus <span dir="ltr"><<a href="mailto:ggus@riseup.net" target="_blank">ggus@riseup.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, does anybody already tried to import from json to isis?<br>
Any tips?<br>
<br>
I'm using isis2json.py to export to mongodb, but I also want to do the<br>
reverse path.<br>
<br>
thanks!,<br>
gus<br>
______________________________<wbr>_________________<br>
isis-users mailing list<br>
<a href="mailto:isis-users@iccisis.org">isis-users@iccisis.org</a><br>
To manage your own subscription options go to: <a href="http://lists.iccisis.org/listinfo/isis-users" rel="noreferrer" target="_blank">http://lists.iccisis.org/<wbr>listinfo/isis-users</a><br>
Or contact Henk Rutten: <a href="mailto:hlrutten@xs4all.nl">hlrutten@xs4all.nl</a><br>
</blockquote></div><br></div>