Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: grit/gather/json_loader.py

Issue 1438403002: Remove contents of grit's git-svn-mirror repository. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « grit/gather/interface.py ('k') | grit/gather/muppet_strings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6
7 from grit.gather import interface
8
9
10 class JsonLoader(interface.GathererBase):
11 '''A simple gatherer that loads and parses a JSON file.'''
12
13 def Parse(self):
14 '''Reads and parses the text of self._json_text into the data structure in
15 self._data.
16 '''
17 self._json_text = self._LoadInputFile()
18 self._data = None
19
20 globs = {}
21 exec('data = ' + self._json_text, globs)
22 self._data = globs['data']
23
24 def GetData(self):
25 '''Returns the parsed JSON data.'''
26 return self._data
OLDNEW
« no previous file with comments | « grit/gather/interface.py ('k') | grit/gather/muppet_strings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698