Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  chap1.html   Sprache: HTML

 
 products/sources/formale Sprachen/GAP/pkg/json/doc/chap1.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (json) - Chapter 1: GAP-JSON mapping</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap1"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap0.html">[Previous Chapter]</a>    <a href="chapInd.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap1_mj.html">[MathJax on]</a></p>
<p><a id="X87B639367C9770AE" name="X87B639367C9770AE"></a></p>
<div class="ChapSects"><a href="chap1.html#X87B639367C9770AE">1 <span class="Heading">GAP-JSON mapping</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap1.html#X8606FDCE878850EF">1.1 <span class="Heading">Methods</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap1.html#X83B041337FB4E4D1">1.1-1 GapToJsonStream</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap1.html#X855531F88506F3D0">1.1-2 GapToJsonString</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap1.html#X823A762684DC39C1">1.1-3 JsonStringToGap</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap1.html#X823DB24A7D2F7D64">1.1-4 JsonStreamToGap</a></span>
</div></div>
</div>

<h3>1 <span class="Heading">GAP-JSON mapping</span></h3>

<p>This package defines a mapping between the JSON markup language and GAP. The built-in datatypes of GAP provide an easy mapping to and from JSON. This package uses the following mapping between GAP and JSON.</p>


<ul>
<li><p>JSON lists are mapped to GAP lists</p>

</li>
<li><p>JSON dictionaries are mapped to GAP records</p>

</li>
<li><p>JSON strings are mapped to GAP strings</p>

</li>
<li><p>Integers are mapped to GAP integers, non-integer numbers are mapped to Floats</p>

</li>
<li><p>true, false and null are mapped to true, false and fail respectively</p>

</li>
</ul>
<p>Note that this library is *NOT* intended to provide a general purpose library for transmitting any GAP object. If you wish to do this, look at the openmath package, or IO_Pickle in the IO package.</p>

<p><a id="X8606FDCE878850EF" name="X8606FDCE878850EF"></a></p>

<h4>1.1 <span class="Heading">Methods</span></h4>

<p><a id="X83B041337FB4E4D1" name="X83B041337FB4E4D1"></a></p>

<h5>1.1-1 GapToJsonStream</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GapToJsonStream</code>( <var class="Arg">stream</var>, <var class="Arg">value</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Converts the <var class="Arg">value</var> to JSON, and outputs it to <var class="Arg">stream</var>. This function disables GAP's usual line splitting while JSON is being outputted.



<p><a id="X855531F88506F3D0" name="X855531F88506F3D0"></a></p>

<h5>1.1-2 GapToJsonString</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GapToJsonString</code>( <var class="Arg">value</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: string</p>

<p>Converts a GAP <var class="Arg">value</var> to a JSON string.</p>

<p><a id="X823A762684DC39C1" name="X823A762684DC39C1"></a></p>

<h5>1.1-3 JsonStringToGap</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JsonStringToGap</code>( <var class="Arg">string</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: value</p>

<p>Converts a JSON <var class="Arg">string</var> into a GAP value.</p>

<p><a id="X823DB24A7D2F7D64" name="X823DB24A7D2F7D64"></a></p>

<h5>1.1-4 JsonStreamToGap</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ JsonStreamToGap</code>( <var class="Arg">stream</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: value</p>

<p>Reads a single JSON object from a <var class="Arg">stream</var> and converts it to a GAP value.</p>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap0.html">[Previous Chapter]</a>    <a href="chapInd.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

100%


¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge