Skip to main content

Posts

Showing posts from 2021

Google Service Account -- Uploading document to Google Workspace Bucket

  1, Create an account in google 2, Open url  https://console.cloud.google.com/ From the highlighted part of the above screenshot, click and add a new project, It is the project to which we are going to create service account. 3, After project is created , we need to create the authentication type for clients to access our project Click  Create Credentials  => Choose Service Account Create Service account, Generate key json file, also set permissions. 4, Next Create bucket to dump documents

JSON Serialization & Deserialization in c#

 Serialization: Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. JSON Serialization: JSON serialization serializes the public properties of an object into a string, byte array, or stream.  public static string SerializeObject(object obj)         {             string jsonString = null;             DataContractJsonSerializer serializer = null;             MemoryStream memorystream = null;             try             {                 serializer = new DataContractJsonSerializer(obj.GetType());                 memorystream = new MemoryStream();                 serializer.WriteObject(memorystream, obj);...