Im using manticoresearch-ts in order to implement a Helper that communicates with the manticore database. In my specific use case, i need to replace some documents based on the manticore id column. But when calling the IndexApi.replace function with the BigInt, a JSON Type error gets thrown, indicating that "BigInts cannot be serialized".
I know that js JSON.stringify does not have native support for bigint types (as BigInt.toJSON is not implemented) but this is something you'd imagine the official Manticore API library for javascript should handle internally.
By now Im trying to implement a solution that involves using the json-bigint javascript dependency, but im worried that i should quit using the official manticoresearch-ts library as it uses JSON.parse and JSON.stringify internally when calling the API methods (such as IndexApi.replace). My thoughts are that just by using json-bigintparse and stringify methods inside the library, the issue will be solved.
In other words, there's a bug while sending or recieving bigint values with the API.
¿Am I missing something?
¿Is this a known bug within the ts library?
¿Is there any workaround to work with Manticore IDs JSON and javascript?
Im using
manticoresearch-ts
in order to implement a Helper that communicates with the manticore database. In my specific use case, i need to replace some documents based on the manticoreid
column. But when calling theIndexApi.replace
function with the BigInt, a JSON Type error gets thrown, indicating that"BigInts cannot be serialized"
.I know that js
JSON.stringify
does not have native support forbigint
types (asBigInt.toJSON
is not implemented) but this is something you'd imagine the official Manticore API library for javascript should handle internally.By now Im trying to implement a solution that involves using the json-bigint javascript dependency, but im worried that i should quit using the official
manticoresearch-ts
library as it usesJSON.parse
andJSON.stringify
internally when calling the API methods (such asIndexApi.replace
). My thoughts are that just by usingjson-bigint
parse
andstringify
methods inside the library, the issue will be solved.In other words, there's a bug while sending or recieving
bigint
values with the API.