-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace json decoder with json-c library
Summary: The license of the current json decoder used in the ext_json library presents ackaging issues for debian, replace the library with the MIT licensed json-c library. The integration code here is a port of the PECL jsonc extension by Remi Collet. There is one main outstanding issues: * There are a few facebook specific changes to the json decoder to implement an FB_LOOSE flag allowing json like '{z:1}' to be valid, this has not been reimplemented. There are probably a variety of smaller issues as well, the patch mearly appears to work in some circumstances and still needs careful review. Closes #2612 Reviewed By: @JoelMarcey Differential Revision: D1316200 Pulled By: @ptarjan
- Loading branch information
1 parent
008a17b
commit 04fd889
Showing
7 changed files
with
362 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Find libjsonc | ||
# | ||
# LIBJSONC_INCLUDE_DIR | ||
# LIBJSONC_LIBRARY | ||
|
||
IF (LIBJSONC_INCLUDE_DIR) | ||
# Already in cache, be silent | ||
SET(LIBJSONC_FIND_QUIETLY TRUE) | ||
ENDIF (LIBJSONC_INCLUDE_DIR) | ||
|
||
FIND_PATH(LIBJSONC_INCLUDE_DIR json/json.h json-c/json.h) | ||
FIND_LIBRARY(LIBJSONC_LIBRARY json json-c) | ||
|
||
if (LIBJSONC_LIBRARY) | ||
add_definitions(-DHAVE_JSONC) | ||
endif() | ||
|
||
IF (EXISTS ${LIBJSONC_INCLUDE_DIR}/json-c/json.h) | ||
add_definitions(-DJSONC_INCLUDE_WITH_C) | ||
endif() | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBJSONC DEFAULT_MSG LIBJSONC_LIBRARY LIBJSONC_INCLUDE_DIR) | ||
|
||
MARK_AS_ADVANCED(LIBJSONC_LIBRARY LIBJSONC_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.