@@ -8,7 +8,7 @@ namespace Serialization.JSON
88 public struct JSONProperty : IDisposable
99 {
1010 private readonly Text name ;
11- private Allocation value ;
11+ private MemoryAddress value ;
1212 private uint length ;
1313 private Type type ;
1414
@@ -42,7 +42,7 @@ readonly get
4242 uint newLength = value . Length * sizeof ( char ) ;
4343 if ( length < newLength )
4444 {
45- Allocation . Resize ( ref this . value , newLength ) ;
45+ MemoryAddress . Resize ( ref this . value , newLength ) ;
4646 }
4747
4848 length = newLength ;
@@ -115,7 +115,7 @@ public JSONProperty(USpan<char> name, USpan<char> text)
115115 {
116116 this . name = new ( name ) ;
117117 length = text . Length * sizeof ( char ) ;
118- value = Allocation . Create ( length ) ;
118+ value = MemoryAddress . Allocate ( length ) ;
119119 value . Write ( 0 , text ) ;
120120 type = Type . Text ;
121121 }
@@ -124,7 +124,7 @@ public JSONProperty(USpan<char> name, double number)
124124 {
125125 this . name = new ( name ) ;
126126 length = sizeof ( double ) ;
127- value = Allocation . Create ( length ) ;
127+ value = MemoryAddress . Allocate ( length ) ;
128128 value . Write ( 0 , number ) ;
129129 type = Type . Number ;
130130 }
@@ -133,7 +133,7 @@ public JSONProperty(USpan<char> name, bool boolean)
133133 {
134134 this . name = new ( name ) ;
135135 length = sizeof ( bool ) ;
136- value = Allocation . Create ( length ) ;
136+ value = MemoryAddress . Allocate ( length ) ;
137137 value . Write ( 0 , boolean ) ;
138138 type = Type . Boolean ;
139139 }
@@ -142,7 +142,7 @@ public unsafe JSONProperty(USpan<char> name, JSONObject obj)
142142 {
143143 this . name = new ( name ) ;
144144 length = ( uint ) sizeof ( nint ) ;
145- value = Allocation . Create ( length ) ;
145+ value = MemoryAddress . Allocate ( length ) ;
146146 value . Write ( 0 , obj . Address ) ;
147147 type = Type . Object ;
148148 }
@@ -151,7 +151,7 @@ public unsafe JSONProperty(USpan<char> name, JSONArray array)
151151 {
152152 this . name = new ( name ) ;
153153 length = ( uint ) sizeof ( nint ) ;
154- value = Allocation . Create ( length ) ;
154+ value = MemoryAddress . Allocate ( length ) ;
155155 value . Write ( 0 , array . Address ) ;
156156 type = Type . Array ;
157157 }
0 commit comments