Git Product home page Git Product logo

Comments (7)

msalafia avatar msalafia commented on May 26, 2024

OPC UA Web Platform use two packages for managing JSON and JSON schema: Json.NET and NJsonSchema. We use only free features of the first one, because only validation are limited for free license (and we don't use them). So that, there is no need to change dependency.

Hope this could be clarifying.

from opcuawebplatformunict.

jkancio avatar jkancio commented on May 26, 2024

I'm sorry, but I've got an error:
The free-quota limit of 10 schema generations per hour has been reached. Please visit http://www.newtonsoft.com/jsonschema to upgrade to a commercial license.

Besides that, I've seen in https://www.newtonsoft.com/jsonschema that Json.NET Schema is paid and the code has "using Newtonsoft.Json.Schema;", for instance, in ...OPCUAWebPlatformUniCT\OPCUA_Web_Platform\Models\OPCUA\UaValue.cs (class UaValue).

Am I Wrong?

from opcuawebplatformunict.

msalafia avatar msalafia commented on May 26, 2024

This is strange because i saw that Json.NET has limitation only for JSON Schema validation (1000 per hous) and not for schema generation.

Can you please provide the line that rise this error?

from opcuawebplatformunict.

jkancio avatar jkancio commented on May 26, 2024

Sorry, but since the time I've written to you, I could not reproduce the error anymore.
I've been using the code and it is fine up to now.

from opcuawebplatformunict.

jkancio avatar jkancio commented on May 26, 2024

Hi, msalafia,
I've got again the error at line 238 of DataTypeManager.cs, as you can see bellow.

## JSchemaException: The free-quota limit of 10 schema generations per hour has been reached. Please visit http://www.newtonsoft.com/jsonschema to upgrade to a commercial license.

Newtonsoft.Json.Schema.Infrastructure.Licensing.LicenseHelpers.IncrementAndCheckGenerationCount()
Newtonsoft.Json.Schema.Generation.JSchemaGenerator.Generate(Type type, bool rootSchemaNullable)
WebPlatform.OPCUALayer.DataTypeManager.SerializeFloat(VariableNode variableNode, Variant value, bool generateSchema) in DataTypeManager.cs
+
{
var schemaGenerator = new JSchemaGenerator();
if (variableNode.ValueRank == -1)
{
var jFloatVal = new JValue(value.Value);
var schema = (generateSchema) ? schemaGenerator.Generate(typeof(float)) : null;
return new UaValue(jFloatVal, schema);
}
else if (variableNode.ValueRank == 1)
{
var arr = (Array)value.Value;
var jArray = new JArray(arr);

from opcuawebplatformunict.

marcostefanoscroppo avatar marcostefanoscroppo commented on May 26, 2024

Hi @jkancio,
try the code in the branch issue-6.
Please, refer to the pull request #9 for code review and let us know if this issue is solved.
Only some base DataTypes were affected by this problem. Now everything should be ok.

from opcuawebplatformunict.

jkancio avatar jkancio commented on May 26, 2024

I have tested the code since it was published and so far I have not received the error any more.

from opcuawebplatformunict.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.