ephp_json
1.0.0
版權(C)2017-2019 Altenwald Solutions,SL
作者: “ Manuel Rubio”( [email protected] )。
該庫具有EPHP的PHP代碼中的JSON功能,請牢記將其作為純100%Erlang。
EPHP JSON需要在ERLANG/OTP 17+上運行,但並非所有版本都完全兼容或推薦。請參閱列表:
| Erlang版本 | 支持 | 筆記 |
|---|---|---|
| 22.1 | ✔️ | 如果您使用OTP 22,建議使用 |
| 22.0 | ✔️ | |
| 21.3 | ✔️ | 如果您使用OTP 21,建議使用 |
| 21.2 | ✔️ | |
| 21.1 | ✔️ | |
| 21.0 | ✔️ | |
| 20.3 | 數學和數字轉換失敗 | |
| 20.2 | ✔️ | 如果您使用OTP 20,建議使用 |
| 20.1 | ✔️ | |
| 20.0 | ✔️ | |
| 19.3 | ✔️ | 建議如果使用OTP 19 |
| 19.2 | ✔️ | |
| 19.1 | ✔️ | |
| 19.0 | ✔️ | |
| 18.3 | ✔️ | 如果您使用OTP 18,建議使用 |
| 18.2.1 | ✔️ | |
| 18.2 | ✔️ | |
| 18.1 | ✔️ | |
| 18.0 | ✔️ |
一種簡單的使用方法,包括您的項目rebar.config以下依賴關係行:
{ ephp_json , " .* " , { git , " git://github.com/bragful/ephp_json.git " , master }}並在項目中使用以下代碼:
{ ok , Ctx } = ephp : context_new (),
ephp : register_module ( Ctx , ephp_lib_json ),
PHP = " Empty array output as array: <?=json_encode('tada')?> " ,
{ ok , Text } = ephp : eval ( Ctx , PHP ).存儲在Text中的結果應為:
Empty array output as array: "tada"
享受!
| ephp_lib_json |