Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 5b94fd2c12712e04345d4b130358afbb352f6436 authored by vthierry on 28 October 2025, 18:54:37 UTC, committed by vthierry on 28 October 2025, 18:54:37 UTC
sync from makefile
1 parent 4ad30c1
  • Files
  • Changes
  • a206553
  • /
  • public
  • /
  • wJSON.html
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:5b94fd2c12712e04345d4b130358afbb352f6436
directory badge
swh:1:dir:28c1523fab318e277996fac88c12a1b3d8a9190d
content badge
swh:1:cnt:a2f8e9ef14fc6d5b48912a97a8e51e0097dec35f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
wJSON.html
<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>wJSON - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <input type="text" id="nav-search" placeholder="Search" />
    
    
    <h2><a href="index.html">Home</a></h2><h3>Objects</h3><ul><li><a href="FValue.html">FValue</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="FValue.html#set">set</a></li></ul></li><li><a href="LValue.html">LValue</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="LValue.html#getTurtoise">getTurtoise</a></li><li data-type='method' style='display: none;'><a href="LValue.html#setTurtoise">setTurtoise</a></li><li data-type='method' style='display: none;'><a href="LValue.html#deduce">deduce</a></li><li data-type='method' style='display: none;'><a href="LValue.html#.readTriples">readTriples</a></li></ul></li><li><a href="Value.html">Value</a><ul class='members'><li data-type='member' style='display: none;'><a href="Value.html#.EMPTY">EMPTY</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Value.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="Value.html#isEmpty">isEmpty</a></li><li data-type='method' style='display: none;'><a href="Value.html#isRecord">isRecord</a></li><li data-type='method' style='display: none;'><a href="Value.html#isArray">isArray</a></li><li data-type='method' style='display: none;'><a href="Value.html#isMember">isMember</a></li><li data-type='method' style='display: none;'><a href="Value.html#length">length</a></li><li data-type='method' style='display: none;'><a href="Value.html#count">count</a></li><li data-type='method' style='display: none;'><a href="Value.html#getNames">getNames</a></li><li data-type='method' style='display: none;'><a href="Value.html#size">size</a></li><li data-type='method' style='display: none;'><a href="Value.html#get">get</a></li><li data-type='method' style='display: none;'><a href="Value.html#at">at</a></li><li data-type='method' style='display: none;'><a href="Value.html#aget">aget</a></li><li data-type='method' style='display: none;'><a href="Value.html#set">set</a></li><li data-type='method' style='display: none;'><a href="Value.html#add">add</a></li><li data-type='method' style='display: none;'><a href="Value.html#copy">copy</a></li><li data-type='method' style='display: none;'><a href="Value.html#erase">erase</a></li><li data-type='method' style='display: none;'><a href="Value.html#rename">rename</a></li><li data-type='method' style='display: none;'><a href="Value.html#clear">clear</a></li><li data-type='method' style='display: none;'><a href="Value.html#sort">sort</a></li><li data-type='method' style='display: none;'><a href="Value.html#sortNames">sortNames</a></li><li data-type='method' style='display: none;'><a href="Value.html#equals">equals</a></li></ul></li><li><a href="WJSONReader.html">WJSONReader</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="WJSONReader.html#.read">read</a></li></ul></li><li><a href="WJSONWriter.html">WJSONWriter</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="WJSONWriter.html#.write">write</a></li></ul></li><li><a href="wJSON.html">wJSON</a><ul class='methods'><li data-type='method' style='display: none;'><a href="wJSON.html#.parse">parse</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.stringify">stringify</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.wjson2json">wjson2json</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.wjson2wjson">wjson2wjson</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#quote">quote</a></li><li><a href="global.html#string2json">string2json</a></li><li><a href="global.html#array2vector">array2vector</a></li><li><a href="global.html#run_protege">run_protege</a></li><li><a href="global.html#ttl2n3">ttl2n3</a></li><li><a href="global.html#wjson2html">wjson2html</a></li><li><a href="global.html#wjson2json">wjson2json</a></li><li><a href="global.html#wjson2wjson">wjson2wjson</a></li></ul>
    
</nav>

<div id="main">
    
    <h1 class="page-title">wJSON</h1>
    

    




<section>

<header>
    
        <h2>
        
            wJSON
        
        </h2>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

    

    <h4 class="name" id="wJSON"><span class="type-signature"></span>factory wJSON<span class="type-signature"></span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Implements the JavaScript JSON weak-syntax reader and writer.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






























        
        </div>
    

    

    

    
    
    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".parse"><span class="type-signature type-signature-static">(static) </span>parse<span class="signature">(value)</span><span class="type-signature"> &rarr; {value}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Parses a data structure from a JSON weak-syntax string.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>The value given as a string, using weak <a href="http://json.org">JSON</a> syntax.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The parsed data-structure.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">value</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".stringify"><span class="type-signature type-signature-static">(static) </span>stringify<span class="signature">(value, pretty<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Converts a data structure the a light weak JSON syntax with a minimal number of quotes.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">value</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The parsed data-structure.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pretty</code></td>
            

            <td class="type">
            
                
<span class="param-type">bool</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>false</code>
                
                </td>
            

            <td class="description last"><ul>
<li>If true properly format in 2D.</li>
<li>If &quot;html&quot; returns a colored HTML 2D string to vizualize the result.</li>
<li>If &quot;latex&quot; returns a latex header and a latex body to copy paste, as <a href="./wjson_test.js_latex_stringify.pdf">shown here</a> <a href="./wjson_test.js_latex_stringify.tex">(source)</a>.</li>
<li>If &quot;minimized&quot; returns a string with a minimal number of chars.</li>
<li>If false returns a readable one-line raw format.</li>
</ul></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>A 2D formated string view of the value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".wjson2json"><span class="type-signature type-signature-static">(static) </span>wjson2json<span class="signature">(value, pretty<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Reformats a weak JSON syntax string to a normalized standard JSON format.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The input value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pretty</code></td>
            

            <td class="type">
            
                
<span class="param-type">bool</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>false</code>
                
                </td>
            

            <td class="description last"><p>If true properly format in 2D, else returns a raw format.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The output value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".wjson2wjson"><span class="type-signature type-signature-static">(static) </span>wjson2wjson<span class="signature">(value, pretty<span class="signature-attributes">opt</span>, value)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Reformats a strong or weak JSON syntax string to a normalized weak JSON format.</p></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The input value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pretty</code></td>
            

            <td class="type">
            
                
<span class="param-type">bool</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>false</code>
                
                </td>
            

            <td class="description last"><ul>
<li>If true properly format in 2D, else returns a raw format.</li>
<li>If &quot;html&quot; returns a colored HTML 2D string to vizualize the result.</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The input value.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The output value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>

    



        
    

    

    
</article>

</section>




    
    
</div>

<br class="clear">

<footer>
    <div style='float: right;font-style: italic;'>2025-10-28 version.</div>
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>

<script src="scripts/search.js" defer></script>


<script src="scripts/collapse.js" defer></script>


</body>
</html>
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API