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

Side by Side Diff: appengine/ephelper/epfrontend/json.go

Issue 1750143003: Remove ephelper and other endpoints code. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 9 months 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 | « appengine/ephelper/epfrontend/error_test.go ('k') | appengine/ephelper/epfrontend/service.go » ('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 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package epfrontend
6
7 import (
8 "encoding/json"
9 )
10
11 type jsonRWRawMessage struct {
12 v interface{}
13 raw []byte
14 }
15
16 var _ interface {
17 json.Marshaler
18 json.Unmarshaler
19 } = (*jsonRWRawMessage)(nil)
20
21 func (m *jsonRWRawMessage) MarshalJSON() ([]byte, error) {
22 if m.raw != nil {
23 return m.raw, nil
24 }
25 return json.Marshal(m.v)
26 }
27
28 func (m *jsonRWRawMessage) UnmarshalJSON(data []byte) error {
29 m.raw = data
30 return nil
31 }
OLDNEW
« no previous file with comments | « appengine/ephelper/epfrontend/error_test.go ('k') | appengine/ephelper/epfrontend/service.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698