JSON Parser in C#

Sela 126 Reputation points
2022-01-23T11:25:27.197+00:00

Hi guys, I have a quick question about parsing a json file. Could someone explain to me about LEX/YACC, how can I think of it for a json file? Do I need to implement a lexical analyzer myself or are there standard libraries I can use? The programming language used is C#.

Best regards,
Sela

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,197 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,364 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,282 questions
0 comments No comments
{count} votes

2 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 57,731 Reputation points
    2022-01-23T16:51:38.943+00:00

    There is also the popular newtonsoft library

    https://www.newtonsoft.com/json

    While you could write a json parser in lex/yacc, these are Unix tools and are not commonly used in the windows world. Actually ANTLR is more commonly used.

    https://www.antlr.org/

    0 comments No comments

  2. Limitless Technology 39,416 Reputation points
    2022-01-24T15:18:24.857+00:00

    Hello Sela,

    I would recommend to check the next posts in MDSN Forum, as they contain recommendation for that kind of parsing tools:

    https://social.msdn.microsoft.com/Forums/en-US/home?searchTerm=parser%20generator%20for%20C%23


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments