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

We're using JSONPath to annotate parts of JSON fields in PostgreSQL that need to be extracted/replaced for localization. Whilst I'd naturally prefer we didn't store display copy in these structures, it was a fun thing to implement.

Contrived example:

    @localizedModel({
      title: {},
      quiz: { jsonPath: '$.[question,answerMd]' },
    })
    class MyQuiz {
      title: string;
      quiz: JSONObject;
    }


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

Search: