Index: OMCompiler/Compiler/FrontEnd/SCodeUtil.mo
===================================================================
--- OMCompiler/Compiler/FrontEnd/SCodeUtil.mo	(revision None)
+++ OMCompiler/Compiler/FrontEnd/SCodeUtil.mo	(revision None)
@@ -4577,4 +4577,5 @@
     case SCode.COMPONENT(comment = cmt) then SOME(cmt);
     case SCode.CLASS(cmt = cmt) then SOME(cmt);
+    case SCode.EXTENDS() then SOME(SCode.Comment.COMMENT(inElement.ann, NONE()));
     else NONE();
 
Index: OMCompiler/Compiler/NFFrontEnd/NFInstNode.mo
===================================================================
--- OMCompiler/Compiler/NFFrontEnd/NFInstNode.mo	(revision None)
+++ OMCompiler/Compiler/NFFrontEnd/NFInstNode.mo	(revision None)
@@ -922,4 +922,11 @@
   end definition;
 
+  function extendsDefinition
+    input InstNode node;
+    output SCode.Element definition;
+  algorithm
+    CLASS_NODE(nodeType = InstNodeType.BASE_CLASS(definition = definition)) := node;
+  end extendsDefinition;
+
   function setDefinition
     input SCode.Element definition;
Index: OMCompiler/Compiler/Script/NFApi.mo
===================================================================
--- OMCompiler/Compiler/Script/NFApi.mo	(revision None)
+++ OMCompiler/Compiler/Script/NFApi.mo	(revision None)
@@ -927,8 +927,10 @@
   Option<SCode.Comment> cmt;
   JSON j;
+  SCode.Element def;
 algorithm
   InstanceTree.CLASS(node = node, exts = exts, components = comps) := tree;
   node := InstNode.resolveInner(node);
-  cmt := SCodeUtil.getElementComment(InstNode.definition(node));
+  def := InstNode.definition(node);
+  cmt := SCodeUtil.getElementComment(def);
 
   json := JSON.addPair("name", dumpJSONNodePath(node), json);
@@ -936,5 +938,5 @@
   json := JSON.addPair("restriction",
     JSON.makeString(Restriction.toString(InstNode.restriction(node))), json);
-  json := dumpJSONMod(SCodeUtil.elementMod(InstNode.definition(node)), json);
+  json := dumpJSONMod(SCodeUtil.elementMod(def), json);
 
   if not listEmpty(exts) then
@@ -975,7 +977,19 @@
   input list<InstanceTree> exts;
   output JSON json = JSON.emptyArray();
+protected
+  JSON ext_json;
+  InstNode node;
+  SCode.Element ext_def;
 algorithm
   for ext in exts loop
-    json := JSON.addElement(dumpJSONInstanceTree(ext, root = false), json);
+    InstanceTree.CLASS(node = node) := ext;
+    ext_def := InstNode.extendsDefinition(node);
+
+    ext_json := JSON.emptyObject();
+    ext_json := dumpJSONMod(SCodeUtil.elementMod(ext_def), ext_json);
+    ext_json := dumpJSONCommentOpt(SCodeUtil.getElementComment(ext_def), node, ext_json);
+    ext_json := JSON.addPair("baseClass", dumpJSONInstanceTree(ext, root = false), ext_json);
+
+    json := JSON.addElement(ext_json, json);
   end for;
 end dumpJSONExtends;
Index: doc/instanceAPI/getModelInstance.schema.json
===================================================================
--- doc/instanceAPI/getModelInstance.schema.json	(revision None)
+++ doc/instanceAPI/getModelInstance.schema.json	(revision None)
@@ -17,13 +17,13 @@
       "type": "#/definitions/modifier"
     },
+    "comment": {
+      "$ref": "#/definitions/comment"
+    },
     "extends": {
       "description": "The extends clauses in the class instance",
       "type": "array",
       "items": {
-        "$ref": "#"
-      }
-    },
-    "comment": {
-      "$ref": "#/definitions/comment"
+        "$ref": "#/definitions/extends"
+      }
     },
     "components": {
@@ -118,4 +118,22 @@
           }
         ]
+      }
+    },
+    "extends": {
+      "description": "An extends clause",
+      "type": "object",
+      "properties": {
+        "modifiers": {
+          "description": "SCode modifier on the extends clause",
+          "type": "#/definitions/modifier"
+        },
+        "annotation": {
+          "description": "Annotation on the extends clause",
+          "type": "#/definitions/annotation"
+        },
+        "baseClass": {
+          "description": "The class instance of the extended class",
+          "$ref": "#"
+        }
       }
     },
@@ -168,5 +186,5 @@
               "required": ["absyn", "typed"]
             },
-            "modifier": {
+            "modifiers": {
               "description": "Modifier from the SCode",
               "type": "#/definitions/modifier"
@@ -248,7 +266,7 @@
       "type": "object",
       "properties": {
-        "value": [
+        "value": {
           "type": "string"
-        ],
+        },
         "modifiers": {
           "type": "array",
Index: testsuite/openmodelica/instance-API/GetModelInstanceAttributes2.mos
===================================================================
--- testsuite/openmodelica/instance-API/GetModelInstanceAttributes2.mos	(revision None)
+++ testsuite/openmodelica/instance-API/GetModelInstanceAttributes2.mos	(revision None)
@@ -38,24 +38,26 @@
 //   \"extends\": [
 //     {
-//       \"name\": \"A\",
-//       \"restriction\": \"model\",
-//       \"components\": [
-//         {
-//           \"name\": \"w\",
-//           \"type\": \"Real\",
-//           \"prefixes\": {
-//             \"public\": false,
-//             \"replaceable\": true,
-//             \"redeclare\": true
+//       \"baseClass\": {
+//         \"name\": \"A\",
+//         \"restriction\": \"model\",
+//         \"components\": [
+//           {
+//             \"name\": \"w\",
+//             \"type\": \"Real\",
+//             \"prefixes\": {
+//               \"public\": false,
+//               \"replaceable\": true,
+//               \"redeclare\": true
+//             }
+//           },
+//           {
+//             \"name\": \"z\",
+//             \"type\": \"Real\",
+//             \"prefixes\": {
+//               \"inner\": true
+//             }
 //           }
-//         },
-//         {
-//           \"name\": \"z\",
-//           \"type\": \"Real\",
-//           \"prefixes\": {
-//             \"inner\": true
-//           }
-//         }
-//       ]
+//         ]
+//       }
 //     }
 //   ],
Index: testsuite/openmodelica/instance-API/GetModelInstanceConnection1.mos
===================================================================
--- testsuite/openmodelica/instance-API/GetModelInstanceConnection1.mos	(revision None)
+++ testsuite/openmodelica/instance-API/GetModelInstanceConnection1.mos	(revision None)
@@ -35,60 +35,62 @@
 //   \"extends\": [
 //     {
-//       \"name\": \"A\",
-//       \"restriction\": \"model\",
-//       \"components\": [
-//         {
-//           \"name\": \"c1\",
-//           \"type\": {
-//             \"name\": \"C\",
-//             \"restriction\": \"connector\",
-//             \"components\": [
-//               {
-//                 \"name\": \"e\",
-//                 \"type\": \"Real\",
-//                 \"prefixes\": {
+//       \"baseClass\": {
+//         \"name\": \"A\",
+//         \"restriction\": \"model\",
+//         \"components\": [
+//           {
+//             \"name\": \"c1\",
+//             \"type\": {
+//               \"name\": \"C\",
+//               \"restriction\": \"connector\",
+//               \"components\": [
+//                 {
+//                   \"name\": \"e\",
+//                   \"type\": \"Real\",
+//                   \"prefixes\": {
 //
+//                   }
+//                 },
+//                 {
+//                   \"name\": \"f\",
+//                   \"type\": \"Real\",
+//                   \"prefixes\": {
+//                     \"connector\": \"flow\"
+//                   }
 //                 }
-//               },
-//               {
-//                 \"name\": \"f\",
-//                 \"type\": \"Real\",
-//                 \"prefixes\": {
-//                   \"connector\": \"flow\"
+//               ]
+//             },
+//             \"prefixes\": {
+//
+//             }
+//           },
+//           {
+//             \"name\": \"c2\",
+//             \"type\": {
+//               \"name\": \"C\",
+//               \"restriction\": \"connector\",
+//               \"components\": [
+//                 {
+//                   \"name\": \"e\",
+//                   \"type\": \"Real\",
+//                   \"prefixes\": {
+//
+//                   }
+//                 },
+//                 {
+//                   \"name\": \"f\",
+//                   \"type\": \"Real\",
+//                   \"prefixes\": {
+//                     \"connector\": \"flow\"
+//                   }
 //                 }
-//               }
-//             ]
-//           },
-//           \"prefixes\": {
+//               ]
+//             },
+//             \"prefixes\": {
 //
+//             }
 //           }
-//         },
-//         {
-//           \"name\": \"c2\",
-//           \"type\": {
-//             \"name\": \"C\",
-//             \"restriction\": \"connector\",
-//             \"components\": [
-//               {
-//                 \"name\": \"e\",
-//                 \"type\": \"Real\",
-//                 \"prefixes\": {
-//
-//                 }
-//               },
-//               {
-//                 \"name\": \"f\",
-//                 \"type\": \"Real\",
-//                 \"prefixes\": {
-//                   \"connector\": \"flow\"
-//                 }
-//               }
-//             ]
-//           },
-//           \"prefixes\": {
-//
-//           }
-//         }
-//       ]
+//         ]
+//       }
 //     }
 //   ],
Index: testsuite/openmodelica/instance-API/GetModelInstanceDuplicate1.mos
===================================================================
--- testsuite/openmodelica/instance-API/GetModelInstanceDuplicate1.mos	(revision None)
+++ testsuite/openmodelica/instance-API/GetModelInstanceDuplicate1.mos	(revision None)
@@ -26,15 +26,17 @@
 //   \"extends\": [
 //     {
-//       \"name\": \"A\",
-//       \"restriction\": \"model\",
-//       \"components\": [
-//         {
-//           \"name\": \"x\",
-//           \"type\": \"Real\",
-//           \"prefixes\": {
+//       \"baseClass\": {
+//         \"name\": \"A\",
+//         \"restriction\": \"model\",
+//         \"components\": [
+//           {
+//             \"name\": \"x\",
+//             \"type\": \"Real\",
+//             \"prefixes\": {
 //
+//             }
 //           }
-//         }
-//       ]
+//         ]
+//       }
 //     }
 //   ],
Index: testsuite/openmodelica/instance-API/GetModelInstanceExtends1.mos
===================================================================
--- testsuite/openmodelica/instance-API/GetModelInstanceExtends1.mos	(revision None)
+++ testsuite/openmodelica/instance-API/GetModelInstanceExtends1.mos	(revision None)
@@ -13,8 +13,9 @@
   model M
     Real y;
-    extends A;
+    extends A(x = 1) annotation(IconMap(extent = {{-100, -100}, {100, 100}}));
     Real z;
   end M;
 ");
+getErrorString();
 
 getModelInstance(M, prettyPrint=true);
@@ -22,4 +23,5 @@
 // Result:
 // true
+// ""
 // "{
 //   \"name\": \"M\",
@@ -27,15 +29,39 @@
 //   \"extends\": [
 //     {
-//       \"name\": \"A\",
-//       \"restriction\": \"model\",
-//       \"components\": [
-//         {
-//           \"name\": \"x\",
-//           \"type\": \"Real\",
-//           \"prefixes\": {
+//       \"modifiers\": {
+//         \"x\": {
+//           \"value\": \"1\"
+//         }
+//       },
+//       \"annotation\": {
+//         \"IconMap\": {
+//           \"extent\": [
+//             [
+//               -100,
+//               -100
+//             ],
+//             [
+//               100,
+//               100
+//             ]
+//           ]
+//         }
+//       },
+//       \"baseClass\": {
+//         \"name\": \"A\",
+//         \"restriction\": \"model\",
+//         \"components\": [
+//           {
+//             \"name\": \"x\",
+//             \"type\": \"Real\",
+//             \"value\": {
+//               \"binding\": 1
+//             },
+//             \"prefixes\": {
 //
+//             }
 //           }
-//         }
-//       ]
+//         ]
+//       }
 //     }
 //   ],
