What is Pike?
Pike is a dynamically typed, interpreted, general-purpose programming language with a syntax similar to C and Java but with high-level features such as built-in mappings, multisets, and a powerful object model. It is open source under the GPL/LGPL/MPL and is best known for being the implementation language of the Roxen WebServer and Caudium.
Where is Pike used?
Pike powers the Roxen WebServer (and historically the AutoMatic Knowledge Base for Roxen), the Caudium content server, and a small but dedicated developer community for high-performance dynamic web sites and protocol bridges. Opera Software historically used Pike for their server-side mail and chat infrastructure.
How do mappings differ from arrays in Pike?
A Pike mapping is a hash-table-style key/value collection written ([ "key": value, ... ]) — directly analogous to a JSON object or a Python dict. An array is an ordered list written ({ value1, value2, ... }) — directly analogous to a JSON array. Pike’s type system can constrain a mapping with mapping(string:mixed) (string keys, any value type) — what the generator emits.
How are JSON booleans encoded?
Pike historically had no native bool — true and false are represented as integer 1 and 0 (or any non-zero value vs zero in conditionals). Modern Pike does have Val.true and Val.false objects from the Val module, but for JSON round-tripping with Standards.JSON the integer encoding is the most predictable choice.
How are nulls encoded?
JSON null becomes UNDEFINED in Pike, which evaluates as 0 in most contexts but is distinct from a missing mapping key. Standards.JSON.decode_utf8() round-trips null to UNDEFINED automatically; the generator follows the same convention.
How do I parse JSON at runtime in Pike?
Use the Standards.JSON module — Standards.JSON.decode_utf8(raw_bytes) returns the parsed mapping/array/scalar tree. Encode back with Standards.JSON.encode(value). The generator output mirrors what Standards.JSON.decode produces, so you can paste an example into your code as a fixture.
Is the JSON uploaded to your servers?
No. Conversion runs entirely in your browser via JavaScript. Open DevTools → Network and click Convert — no requests are made. Pasting JSON containing tokens or proprietary data never leaves your machine.
Can I use this output as a Pike fixture?
Yes — the output is directly assignable to a Pike variable. Paste it into a test file, give it a name, and you have a deterministic in-memory fixture. For more rigor, write the JSON to disk and decode it at test setup with Standards.JSON.decode_utf8 so the parser path is exercised.