src/core/ngx_json_unescape.h - nginx-1.31.7 nginx/ @ 939334eff

Macros defined

Source code


  1. /*
  2. * Copyright (C) Nginx, Inc.
  3. */


  4. #ifndef _NGX_JSON_UNESCAPE_H_INCLUDED_
  5. ‌#define _NGX_JSON_UNESCAPE_H_INCLUDED_


  6. #include <ngx_config.h>
  7. #include <ngx_core.h>


  8. /*
  9. * Decode JSON escape sequences (RFC 8259, Section 7) in place.  The input
  10. * is an unquoted JSON string body (no surrounding double quotes); on success
  11. * str->len is updated to the decoded length.  Returns NGX_OK, or NGX_ERROR
  12. * on a malformed escape or invalid input.
  13. */
  14. ngx_int_t ngx_json_unescape_string(ngx_str_t *str);
  15. ngx_int_t ngx_json_hex_digit(u_char ch);


  16. #endif /* _NGX_JSON_UNESCAPE_H_INCLUDED_ */