NotionCommotion Posted March 2, 2017 Share Posted March 2, 2017 I am messing around a little with c++. I found that php functions which I take for granted such as json_encode() do not exist in c++. Is it possible to look at php source code and see how they did it? If so, where should I start? Thanks Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted March 2, 2017 Share Posted March 2, 2017 GitHub / php / php-src I highly doubt that this is going to help you, though. The JSON parser is based on a formal grammar and a lot of PHP-specific features. A much better approach would be to use a JSON library for C++. Quote Link to comment Share on other sites More sharing options...
requinix Posted March 2, 2017 Share Posted March 2, 2017 (edited) IIRC some Linux distributions build their phpX-json extension using json-c. [edit] Actually I just don't remember. But I do know that some PHP installations use the ext/json implementation and some don't. jsonc, json-c, and jsond are names that come to mind. Edited March 2, 2017 by requinix Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.