Coder Social home page Coder Social logo

roddyyaga / bs-ppx_deriving_yojson Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocaml-ppx/ppx_deriving_yojson

0.0 1.0 0.0 8.91 MB

A Yojson codec generator for OCaml >= 4.02.

License: MIT License

Makefile 0.96% OCaml 98.97% Standard ML 0.07%

bs-ppx_deriving_yojson's Introduction

An npm package of the ppx_deriving_yojson plugin.

Usage

Add bs-deriving, @roddynpm/bs-yojson and @roddynpm/bs-ppx_deriving_yojson as dependencies in package.json and bs-dependencies in bsconfig.json. Additionally you must add "pp-flags": "@roddynpm/bs-ppx_deriving_yojson/ppx.exe" to bsconfig.json.

Limitations

The actual ppx rewriter is a hack (it is just the executable generated when a dummy project that uses ppx_deriving_yojson is built with dune). It was built on 64-bit Linux using OCaml 4.07.0, so if you have a setup that is incompatible with that you will need to create your own executable. This can be done with dune clean && dune build -- dummy/test.exe && cp _build/default/.ppx/*/ppx.exe . in the root of the package.

It is possible to use both this and ppx-deriving in the same project. To do this you should only include the "pp-flags": "@roddynpm/bs-ppx_deriving_yojson/ppx.exe" line in your bsconfig.json, and not the usual "ppx-flags": ... line for ppx-deriving. This is because the ppx-deriving executables don't contain the yojson deriver and so break on code that uses it. To allow both sets of derivers to be used together, the ppx executable in this package was built to include the standard ppx_deriving plugins.

bs-ppx_deriving_yojson's People

Contributors

whitequark avatar gasche avatar zoggy avatar rgrinberg avatar choeger avatar stevebleazard avatar roddyyaga avatar emillon avatar nightblues avatar dbp avatar alexknauth avatar anmonteiro avatar cemerick avatar c-cube avatar hcarty avatar leonidas-from-xiv avatar aphelionz avatar smondet avatar jacquev6 avatar gerdstolpmann avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.