mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-11 17:12:36 +00:00
chore: Implement settings dump schema to update firefox remote servic…, p=#11579
* chore: Implement settings dump schema to update firefox remote services data, b=no-bug, c=configs, scripts * feat: Also update with timestamps, b=no-bug, c=configs, scripts * chore: Move JSON with comments to a new module, b=no-bug, c=scripts, tests --------- Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
14
scripts/json_with_comments.py
Normal file
14
scripts/json_with_comments.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class JSONWithCommentsDecoder(json.JSONDecoder):
|
||||
def __init__(self, **kw):
|
||||
super().__init__(**kw)
|
||||
|
||||
def decode(self, s: str) -> Any:
|
||||
s = '\n'.join(l for l in s.split('\n') if not l.lstrip(' ').startswith('//'))
|
||||
return super().decode(s)
|
||||
Reference in New Issue
Block a user