Loading ...
Sorry, an error occurred while loading the content.

myPatterns: pattern matching in JSON and custom notations

Expand Messages
  • nic.volanschi
    Hi, I am pleased to announce you the availability of a novel free library for JavaScript, called myPatterns/JS, implementing pattern matching in JSON and other
    Message 1 of 1 , May 11, 2009
    • 0 Attachment
      Hi,

      I am pleased to announce you the availability of a novel free library for JavaScript, called myPatterns/JS, implementing pattern matching in JSON and other custom notations.

      With myPatterns/JS, you can match native JavaScript objects with JSON patterns such as:

      "{name:{firstname:%f, lastname:"Smith"}, children:[%elder | %_]}"

      which both checks if an objects matches the pattern and if yes, returns a resulting substitution, such as: {f:"John", elder:{name: "Bob"}}.
      You can use such patterns for filtering data sequences, too.

      Other, customized notations can be defined with a few lines of JavaScript code. No grammar/parser needed.

      You can try the library online at:

      http://mypatterns.free.fr/

      Any feedback is greatly appreciated!

      Enjoy,
      Nic.
    Your message has been successfully submitted and would be delivered to recipients shortly.