Rajesh Gami

Rajesh Gami

  • 78
  • 24.4k
  • 1.3m

How to get value from .json file in Asp.net core.

Dec 12 2018 5:31 AM
suppose i have two different asp.net core project in one solution.
 
main solution name: ABC_Demo.
sub project: ABC_Demo.Data.
sub Project: ABC_Demo.WebApp.
 
in WebApp project store one json file name: language.json
 
 language.json
  1. {  
  2.       "en": [  
  3.         {  
  4.           "KeyName""Common.Active",  
  5.           "Value""Active"  
  6.         },  
  7.         {  
  8.           "KeyName""Common.InActive",  
  9.           "Value""Inactive"  
  10.         },  
  11.         {  
  12.           "KeyName""Common.Action",  
  13.           "Value""Action"  
  14.         },  
  15.         {  
  16.           "KeyName""Common.IsActive",  
  17.           "Value""Is Active"  
  18.         }  
  19.           ]  
  20.     }  
  21.       
 
Now i create one function method in ABC_Demo.Data in and i want to get data where i pass "KeyName" and i want to get "Value".
ex... if i pass "Common.IsActive" then i will get Is Active.
i want to suggestion for this in asp.net core.
 
 

Answers (1)