<!-- This is an automatically generated file. -->
<Chapter Label="Chapter_GAP-JSON_mapping">
<Heading>GAP-JSON mapping</Heading>
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/>
<List>
<Item>
JSON lists are mapped to GAP lists
</Item>
<Item>
JSON dictionaries are mapped to GAP records
</Item>
<Item>
JSON strings are mapped to GAP strings
</Item>
<Item>
Integers are mapped to GAP integers, non-integer numbers are mapped to Floats
</Item>
<Item>
true, false and null are mapped to true, false and fail respectively
</Item>
</List>
<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.
<Section Label="Chapter_GAP-JSON_mapping_Section_Methods">
<Heading>Methods</Heading>
<ManSection>
<Func Arg="stream value" Name="GapToJsonStream" />
<Description>
Converts the <A>value</A> to JSON, and outputs it to <A>stream</A>.
This function disables GAP's usual line splitting while JSON is
being outputted.
</Description>
</ManSection>
<ManSection>
<Func Arg="value" Name="GapToJsonString" />
<Returns>string
</Returns>
<Description>
Converts a GAP <A>value</A> to a JSON string.
</Description>
</ManSection>
<ManSection>
<Func Arg="string" Name="JsonStringToGap" />
<Returns>value
</Returns>
<Description>
Converts a JSON <A>string</A> into a GAP value.
</Description>
</ManSection>
<ManSection>
<Func Arg="stream" Name="JsonStreamToGap" />
<Returns>value
</Returns>
<Description>
Reads a single JSON object from a <A>stream</A> and converts it to a GAP value.
</Description>
</ManSection>
</Section>
</Chapter>
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
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.