blob: a3ee1ab80e3ff10e159d7eceb18f2b65e89e4954 [file] [log] [blame]
William Kurkian1bedb412018-07-19 12:55:41 -04001/*
2* Copyright 2018- Cisco
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16package mapper;
17
18import org.slf4j.Logger;
19import org.slf4j.LoggerFactory;
20import com.google.gson.Gson;
21import com.google.gson.GsonBuilder;
22
23public class VesVolthaMapper {
24
25 private final Logger logger = LoggerFactory.getLogger("VesVolthaMapper");
26
27 private Gson gson;
28
29 public VesVolthaMapper() {
30 gson = new GsonBuilder().create();
31 }
32
33 public VesVolthaMessage parseJson(String json) {
34 return gson.fromJson(json, VesVolthaMessage.class);
35 }
36}