Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !928

hal_json_style: Tolerate documents with non-utf8 properties

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge jerome/erp5:feat/hal_json_non_utf8 into master Sep 06, 2019
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 2

HAL JSON uses JSON, which uses UTF-8, but properties of ERP5 documents does not enforce any specific encoding, so if we happen to have documents with string properties that are not UTF-8 compatible, they could not be queried with HAL JSON (json.dumps was raising UnicodeError)

This pre-process field default properties and document title to make sure they can be serialized as json. This assumes that configuration (form definition, actions, ...) will be valid UTF-8, but just does extra effort to make sure "broken" data can be displayed without error.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/hal_json_non_utf8
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7