Changeset 30654 in project


Ignore:
Timestamp:
04/06/14 15:41:33 (7 years ago)
Author:
Moritz Heidkamp
Message:

medea: Consolidate contributed documentation changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/medea

    r29656 r30654  
    3232
    3333Writes the given JSON {{datum}} to {{port}} which is
    34 {{(current-output-port)}} by default. {{datum}} may be any object that
    35 is recognized by the current {{(json-unparsers)}} parameter.
     34{{(current-output-port)}} by default. {{datum}}'s conversion to JSON
     35is inferred by its Scheme type via the current {{json-unparsers}}
     36parameter.
     37
     38A common gotcha is that the default {{json-unparsers}} assume lists to
     39be alists which are written as JSON objects. If you want to write a
     40JSON array you need to pass a Scheme vector instead.
    3641
    3742
    3843<procedure>(json->string datum)</procedure>
    3944
    40 Returns a string containing the JSON representation of the given
    41 {{datum}} which may be any object that is recognized by the current
    42 {{(json-unparsers)}} parameter.
    43 
    44 datum's conversion to json types is inferred by it's scheme type, a
    45 common gotcha is that lists are assumed to be alists (to be converted
    46 to json hashes), if you want a json array you should use a vector.
     45Like {{write-json}} but returns a string instead of writing to a port.
    4746
    4847
Note: See TracChangeset for help on using the changeset viewer.