Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Simple answer is that apparently the examples are false, feeding the above string to the JS parser spits out the following object:

    {
      "subjevkos": [
        {
          "prefix": "first name ",
          "jevko": {
            "subjevkos": [],
            "suffix": "John"
          }
        },
        {
          "prefix": "\nlast name ",
          "jevko": {
            "subjevkos": [],
            "suffix": "Smith"
          }
        },
        {
          "prefix": "\nis alive ",
          "jevko": {
            "subjevkos": [],
            "suffix": "true"
          }
        },
        {
          "prefix": "\nage ",
          "jevko": {
            "subjevkos": [],
            "suffix": "27"
          }
        },
        {
          "prefix": "\naddress ",
          "jevko": {
            "subjevkos": [
              {
                "prefix": "\n  street address ",
                "jevko": {
                  "subjevkos": [],
                  "suffix": "21 2nd Street"
                }
              }
            ],
            "suffix": "\n"
          }
        }
      ],
      "suffix": "",
      "opener": "[",
      "closer": "]",
      "escaper": "`"
    }
tbh seems like a pita to clean up afterwards


Thanks for taking the time to look at this. ;)

What you are getting is the plain Jevko parse tree.

The examples explicitly talk about a format built on top of that. See this answer: https://news.ycombinator.com/item?id=33334314




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: