Browse Source

Fix names for JSONAPI's internal methods

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
499b4359ed
  1. 10
      sources/Text/JSON/JSONAPI.uc

10
sources/Text/JSON/JSONAPI.uc

@ -733,7 +733,7 @@ public function HashTable ParseHashTableWith(
}
// Parse property
parsedEntries[parsedEntries.length] =
ParseHashTableProperty(parser, parseAsMutable);
ParseProperty(parser, parseAsMutable);
if (!parser.Ok()) {
break;
}
@ -744,13 +744,12 @@ public function HashTable ParseHashTableWith(
else {
parser.Fail();
}
FreeHashTableEntries(parsedEntries);
FreeEntries(parsedEntries);
return result;
}
// TODO: ParseProperty
// Parses a JSON key-value pair (there must not be any leading spaces).
private function HashTable.Entry ParseHashTableProperty(
private function HashTable.Entry ParseProperty(
Parser parser,
bool parseAsMutable)
{
@ -762,9 +761,8 @@ private function HashTable.Entry ParseHashTableProperty(
return entry;
}
// TODO: FreeEntries
// Auxiliary method for deallocating unneeded objects in entry pairs.
private function FreeHashTableEntries(array<HashTable.Entry> entries)
private function FreeEntries(array<HashTable.Entry> entries)
{
local int i;
for (i = 0; i < entries.length; i += 1)

Loading…
Cancel
Save