New issue
Advanced search Search tips

Issue 872765 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 17
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Update policy_templates.json to dissuade from using 'list' with JSON

Project Member Reported by olsen@chromium.org, Aug 9

Issue description

Using type 'list' seems like a good idea if the policy is indeed
a list. However, it is not a good idea if it is a list of objects,
and so will need to be parsed as JSON - in that case, 'dict' is a
better fit. Will add some documentation to policy_templates.json explaining why. Could also add a presubmit check (if we decide this is worth enforcing).

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a71783e8209232f9f300f82928c4d3e3d822a92

commit 4a71783e8209232f9f300f82928c4d3e3d822a92
Author: A Olsen <olsen@chromium.org>
Date: Fri Aug 10 17:02:07 2018

Update policy_templates.json 'list' doc

Using type 'list' seems like a good idea if the policy is indeed
a list. However, it is not a good idea if it is a list of objects,
and so will need to be parsed as JSON - in that case, 'dict' is a
better fit. Added some documentation explaining why.

Bug:  872765 
Change-Id: I5185f515d7bc82048bfb1eaab5d6d9ae61848eea
Reviewed-on: https://chromium-review.googlesource.com/1169469
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Commit-Queue: A Olsen <olsen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582214}
[modify] https://crrev.com/4a71783e8209232f9f300f82928c4d3e3d822a92/components/policy/resources/policy_templates.json

Status: Verified (was: Started)
Comments are updated.

Sign in to add a comment