Index: trunk/src/org/glassfish/json/JsonNumberImpl.java
===================================================================
--- trunk/src/org/glassfish/json/JsonNumberImpl.java	(revision 6756)
+++ trunk/src/org/glassfish/json/JsonNumberImpl.java	(revision 13231)
@@ -2,5 +2,5 @@
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
@@ -9,10 +9,10 @@
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1
+ * or LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
  * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
+ * file and include the License file at LICENSE.txt.
  *
  * GPL Classpath Exception:
@@ -126,4 +126,9 @@
 
         @Override
+        public Number numberValue() {
+            return num;
+        }
+
+        @Override
         public String toString() {
             return Integer.toString(num);
@@ -143,4 +148,14 @@
         public boolean isIntegral() {
             return true;
+        }
+
+        @Override
+        public int intValue() {
+            return (int) num;
+        }
+
+        @Override
+        public int intValueExact() {
+            return Math.toIntExact(num);
         }
 
@@ -172,4 +187,9 @@
 
         @Override
+        public Number numberValue() {
+            return num;
+        }
+
+        @Override
         public String toString() {
             return Long.toString(num);
@@ -191,4 +211,9 @@
         }
 
+        @Override
+        public Number numberValue() {
+            return bigDecimalValue();
+        }
+
     }
 
@@ -245,4 +270,7 @@
     @Override
     public boolean equals(Object obj) {
+        if (this == obj){
+            return true;
+        }
         if (!(obj instanceof JsonNumber)) {
             return false;
