Skip to content

jonhawkinsctm/segmentation-with-json-logic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Segmentation with JSON Logic

This is an experiment in using JSON logic to segment data based on a static configuration JSON.

Getting started

Install and start the server:

npm install
npm run build
npm start

Routes

Get segmentation details:

curl --location 'http://localhost:3333/segment/Person/Color'

Segment a model:

curl --location 'http://localhost:3333/segment/Person/Color' \
    --header 'Content-Type: application/json' \
    --data '{ "favouriteColor": "green" }'

Should return:

{
  "name": "Likes Green",
  "id": "person-color-green",
  "rule": {
    "==": [
      {
        "var": "favouriteColor"
      },
      "green"
    ]
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published