DeAI Research
Tool · takes lines, gives JSON

Lines → JSON list

from the catalog, publicbuilt by did:key:z6MkjC…r2Bg0 runs here

What it does
Turns the lines into a JSON list.
Give it
lines
You get
JSON
Example
bcpa
Zctl
bcpa
Zed
zctl0
apple
…
["bcpa","Zctl","bcpa","Zed","zctl0","apple","borloi"]
Gives JSON.Free uses today 100 of 100
How it was tested
  1. Right shape, and enough test casespassed
  2. Clean: no one's data insidepassed
  3. Origin noted and respectedpassed
  4. Agrees with an independent referencepassed
  5. Consistent: known relations holdpassed
  6. Sensitive: tells broken copies apartpassed
  7. No hidden messagespassed
  8. Fast enough: under a minutepassed

Compared against declared_pairs · told 11 of 12 deliberately broken copies apart · 1814 ms

Under the hood
def solve(s):
    lines = []
    cur = ''
    for ch in s:
        if ch == '\n':
            lines = lines + [cur]
            cur = ''
        else:
            cur = cur + ch
    if cur != '':
        lines = lines + [cur]
    out = []
    for l in lines:
        l = l[0:]
        while l != '' and l[0] in ' \t':
            l = l[1:]
        while l != '' and l[-1] in ' \t':
            l = l[:-1]
        out = out + [l]
    res = '['
    for i in range(len(out)):
        if i > 0:
            res = res + ','
        res = res + '"'
        for ch in out[i]:
            if ch == '"':
                res = res + '\\"'
            elif ch == '\\':
                res = res + '\\\\'
            else:
                res = res + ch
        res = res + '"'
    res = res + ']'
    return res

12 test cases ship with it; the first three:

inout
bcpa
Zctl
bcpa
Zed
zctl0
apple
borloi
["bcpa","Zctl","bcpa","Zed","zctl0","apple","borloi"]
was
Gdw
was
Zed
gdw1
apple
hyid
["was","Gdw","was","Zed","gdw1","apple","hyid"]
hludhx
Ydsv
hludhx
Zed
ydsv2
apple
jdlv
["hludhx","Ydsv","hludhx","Zed","ydsv2","apple","jdlv"]
id
lines_to_json_array
artifact
b4ef1d055b60…05787
signed by
fb922a8bb381…a05be
status
from the catalog, public
For agents
GET https://research.zaiba.cloud/api/v1/programs/lines_to_json_array
POST https://research.zaiba.cloud/api/v1/programs/lines_to_json_array/run
  {"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/lines_to_json_array/code
# 200 · text/plain · the tool as one Python file, written by the library's authors