// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package io.flutter.plugin.common;
import java.nio.ByteBuffer;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
/**
* A {@link MessageCodec} using UTF-8 encoded JSON messages.
*
*
This codec is guaranteed to be compatible with the corresponding
* JSONMessageCodec
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*
*
Supports the same Java values as {@link JSONObject#wrap(Object)}.
*
*
On the Dart side, JSON messages are handled by the JSON facilities of the
* dart:convert
* package.
*/
public final class JSONMessageCodec implements MessageCodec