Add `opt_string_to_json` and `opt_int_to_json` helper functions to `Hh_json`
commitcb5cd69a38713b8c79674843e17d19d8c03b4c57
authorWaleed Khan <waleedk@fb.com>
Thu, 9 Feb 2017 20:11:06 +0000 (9 12:11 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 9 Feb 2017 20:26:55 +0000 (9 12:26 -0800)
tree0bf878c901ea3fc144babd392f42aeb37b27709b
parent2b8e001c8363bd96d269bef8f3ae6bbc58ee9872
Add `opt_string_to_json` and `opt_int_to_json` helper functions to `Hh_json`

Summary: These functions are used in a few different places, so refactor the common behavior out and add them to `Hh_json`.

Reviewed By: dabek

Differential Revision: D4495861

fbshipit-source-id: 475b079d9e41ffefd0b095815ee6455f00f58971
hphp/hack/src/ide_rpc/ide_rpc_V0_message_printer.ml
hphp/hack/src/ide_rpc/json_rpc_message_printer.ml
hphp/hack/src/ide_rpc/nuclide_rpc_message_printer.ml
hphp/hack/src/utils/hh_json/hh_json.ml
hphp/hack/src/utils/hh_json/hh_json.mli