1750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// Copyright 2013 the V8 project authors. All rights reserved. 2750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// Redistribution and use in source and binary forms, with or without 3750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// modification, are permitted provided that the following conditions are 4750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// met: 5750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// 6750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// * Redistributions of source code must retain the above copyright 7750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// notice, this list of conditions and the following disclaimer. 8750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// * Redistributions in binary form must reproduce the above 9750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// copyright notice, this list of conditions and the following 10750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// disclaimer in the documentation and/or other materials provided 11750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// with the distribution. 12750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// * Neither the name of Google Inc. nor the names of its 13750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// contributors may be used to endorse or promote products derived 14750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// from this software without specific prior written permission. 15750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// 16750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org 28750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.orgvar o = ["\u56e7", // Switch JSON stringifier to two-byte mode. 29750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org "\u00e6"]; // Latin-1 character. 30750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org 31750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.orgassertEquals('["\u56e7","\u00e6"]', JSON.stringify(o)); 327bd87f0fe09b5d7c12de8f1db0bdb759dc4130acjkummerow@chromium.orgassertEquals('["\u56e7","\u00e6"]', JSON.stringify(o, null, 0));