Ejemplo n.º 1
0
 public JsonWithNamingPolicyResult(object data, JsonRequestBehavior_t jsonRequestBehavior
                                   , System.Text.Json.JsonNamingPolicy namingPolicy = null)
 {
     this.Data = data;
     this.JsonRequestBehavior = jsonRequestBehavior;
     this.NamingPolicy        = namingPolicy;
 }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)

        {
            services.AddControllers();
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
            .AddJsonOptions(options =>
            {
                // ignore default camel-case formatting applied to JSON response
                System.Text.Json.JsonNamingPolicy resolver = options.JsonSerializerOptions.PropertyNamingPolicy = null;
            }
                            );

            services.AddDbContext <PaymentDetailContext>(options =>
                                                         options.UseSqlServer(Configuration.GetConnectionString("DevConnection")));
        }
 public JsonStringEnumConverter(System.Text.Json.JsonNamingPolicy namingPolicy = null, bool allowIntegerValues = true)
 {
 }